获取html内容字符串,进行分析 with open('bs1.html',encoding='utf8') as f: html_doc = f.read() # 导入 BeautifulSoup from bs4 import BeautifulSoup # 指定用html5lib来解析html文档 soup = BeautifulSoup(html_doc, "html5lib") # 获取html内容字符串,进行分析 with open('bs1.html',encoding='utf8') as f: html_doc = f.read() # 导入 BeautifulSoup from bs4 import BeautifulSoup # 指定用html5lib来解析html文档 soup = BeautifulSoup(html_doc, "html5lib")
报错:bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: html5lib. Do you need to install a parser library?
大咪
相关分类