does BeautifulSoup strips inline CSS and javascript content
hey开发者_Go百科 guys does beautifulSoup strips css and javascript content? after using
content3 = ''.join(BeautifulSoup(content).findAll(text=True))
i still have them lingering around.
What exactly do you want to strip, all script and style elements? It should be something like:
''.join(BeautifulSoup(content).findAll(text=lambda text:
text.parent.name != "script" and
text.parent.name != "style"))
精彩评论