def clean_tag(doc):
for tag in doc.find_all(["style", "script","form", "textarea", "input", "iframe", "select","frame", "link"]):
tag.extract()
comments = doc.findAll(text=lambda text:isinstance(text, Comment))
[comment.extract() for comment in comments]
评论列表
文章目录