Beautifulsoup4
安装:
pip install beautifulsoup4
pip install html5lib
with open(r'待解析的html文件',mode='r+',encoding='utf-8') as f:
html_doc = f.read()
from bs4 import BeautifulSoup
soup = BeautifulSoup(html_doc,'html5lib')
print(soup)
print(soup.find('a'))
目前没用过,不了解~ 等用过之后再来补充。。。