I am using Python and BeautifulSoup to extract some text from html. I have some html that has text of the form
<h3><b> Abc </b><b> DEF </b> </h3>
I would like to remove the repeated b tag. Is there a quick way to do this?
For bs4 this seems to work just fine
In [4]: soup.h3
Out[4]: <h3><b> Abc </b><b> DEF </b> </h3>
In [5]: soup.h3.text
Out[5]: u' Abc DEF '
check out the docs and the package here: https://beautiful-soup-4.readthedocs.org/en/latest/ https://pypi.python.org/pypi/beautifulsoup4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With