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!
2.1m questions
2.1m answers
60 comments
57.0k users