Alexandre Bourget

geek joy

Archive for August 2009

How to remove all HTML tags from a string

written by abourget, on Aug 27, 2009 2:51:18 PM.

Using BeautifulSoup, in one line, you can:

' '.join(h.BeautifulSoup.BeautifulSoup(some_content).findAll(text=True))