Python Forum
Delimiters - How to skip some html tags from being translate
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Delimiters - How to skip some html tags from being translate
hello. I made a Python script, that translate my html pages languages in other language. This is my english html page that I want to translate in Belarusian, check HERE You can save it for testing

And this is my Python code. The entire code HERE:

The code is ok, the translation is ok except one thing. Some tags are also been translated, this are the tags I don't want to be translated:

Quote:delimitatori_text_interior_articol = [['<h1 class="den_articol" itemprop="name', '</h1>'], ['<p class="text_obisnuit', '</p>'], ['<span class="text', '</span>'], ['<p class="text_obisnuit2">', '</p>'], ['<em>', '<em>']]

but the tag <p class="text_obisnuit2"> </p> is still translated in other languages. For example in Belarusian, it becomes <span клас = «Text_obisnuit2»> </span>

Can anyone find a solution and edit my code?

Possibly Related Threads…
Thread Author Replies Views Last Post
  Get text from within h3 html tags Pedroski55 8 1,103 Jan-05-2022, 06:50 AM
Last Post: Larz60+
  need to skip password prompt, continue... tester_V 2 827 Oct-19-2021, 05:49 PM
Last Post: tester_V
  How to Translate a python code written in Mac-OS to Windows? alexanderDennisEnviro500 2 1,163 Jul-31-2021, 08:36 AM
Last Post: Gribouillis
  reading html and edit chekcbox to html jacklee26 5 1,750 Jul-01-2021, 10:31 AM
Last Post: snippsat
  Parsing link from html tags with Python Melcu54 0 1,015 Jun-14-2021, 09:25 AM
Last Post: Melcu54
  Parse String between 2 Delimiters and add as single list items lastyle 5 1,916 Apr-11-2021, 11:03 PM
Last Post: lastyle
  How to skip to a different line while importing a different script kat_gamer 2 1,287 Feb-03-2021, 04:10 AM
Last Post: deanhystad
  How to skip a folder directory in a loop mfkzolo 2 6,013 Nov-18-2020, 07:56 AM
Last Post: mfkzolo
  How to skip LinkedIn signup link using python script? Mangesh121 0 1,168 Aug-26-2020, 01:22 PM
Last Post: Mangesh121
  Split string between two different delimiters, with exceptions DreamingInsanity 2 1,206 Aug-24-2020, 08:23 AM
Last Post: DreamingInsanity

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020