爬虫dom = BeautifulSoup(html, "lxml") # 解析html文档时出现错误如下:
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need。。。
错误原因:
bs4调用了python自带的html解析器,而版本python3未带有该解析器,需要重新pip下载。
解决方法:
pip install lxml
爬虫dom = BeautifulSoup(html, "lxml") # 解析html文档时出现错误如下:
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need。。。
bs4调用了python自带的html解析器,而版本python3未带有该解析器,需要重新pip下载。
pip install lxml