I have been playing with BeautifulSoup, which is great. My end goal is to try and just get the text from a page. I am just trying to get the text from the body, with a speci
I am still trying to figure out why it doesn't find and strip tags like this:
. Those backslashes cause certain tags to be overlooked.
This may be a problem with the underlying SGML parser: see http://www.crummy.com/software/BeautifulSoup/documentation.html#Sanitizing%20Bad%20Data%20with%20Regexps. You can override it by using a markupMassage
regex -- straight from the docs:
import re, copy
myMassage = [(re.compile('Bar
Baz