BeautifulSoup Python (bs4), find pseudo attribute in style directive

0

I have several html files with entries equivalent to these:

<span style="font-family: Arial; color: black; text-decoration:line-through">1 bla bla</span>
<font style="font-family: Arial; color: black; text-decoration:line-through">2 bla bla</font>
<p style="font-family: Arial; color: black; text-decoration:line-through">3 bla bla</p>

I want to identify them and replace them with:

<del><p>1 bla bla</p></del>
<del><p>2 bla bla</p><del>
<del><p>3 bla bla</p></del>

How can I use bs4 to find all text-decoration: line-through entries

I already tried soup.select ('style *="text-decoration: line-through"'), and it does not work.

    
asked by anonymous 10.10.2018 / 18:32

0 answers