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
#1
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?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to Translate a python code written in Mac-OS to Windows? alexanderDennisEnviro500 2 296 Jul-31-2021, 08:36 AM
Last Post: Gribouillis
  reading html and edit chekcbox to html jacklee26 5 599 Jul-01-2021, 10:31 AM
Last Post: snippsat
  Parsing link from html tags with Python Melcu54 0 376 Jun-14-2021, 09:25 AM
Last Post: Melcu54
  Parse String between 2 Delimiters and add as single list items lastyle 5 786 Apr-11-2021, 11:03 PM
Last Post: lastyle
  How to skip to a different line while importing a different script kat_gamer 2 586 Feb-03-2021, 04:10 AM
Last Post: deanhystad
  How to skip a folder directory in a loop mfkzolo 2 1,877 Nov-18-2020, 07:56 AM
Last Post: mfkzolo
  How to skip LinkedIn signup link using python script? Mangesh121 0 586 Aug-26-2020, 01:22 PM
Last Post: Mangesh121
  Split string between two different delimiters, with exceptions DreamingInsanity 2 742 Aug-24-2020, 08:23 AM
Last Post: DreamingInsanity
  Including a Variable In the HTML Tags When Sending An Email JoeDainton123 0 552 Aug-08-2020, 03:11 AM
Last Post: JoeDainton123
  How to calculate column mean and row skip non numeric and na Mekala 5 1,442 May-06-2020, 10:52 AM
Last Post: anbu23

Forum Jump:

User Panel Messages

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