📜  html代码示例中的python正则表达式

📅  最后修改于: 2022-03-11 14:52:51.806000             🧑  作者: Mango

代码示例1
>>> from bs4 import BeautifulSoup
>>> soup = BeautifulSoup("

SomebadHTML") >>> print soup.prettify()

Some bad HTML import re print(soup.find_all(re.compile("(p|div)")))