I'm trying to extract some text using BeautifulSoup. I'm using get_text() function for this purpose.
BeautifulSoup
get_text()
My problem is that the text contains </br> tags and I need to convert them to end lines. how can I do this?
</br>
A regex should do the trick.
import re s = re.sub('<brs*?>', ' ', yourTextHere)
Hope this helps!
1.4m articles
1.4m replys
5 comments
57.0k users