bs4解析網頁時報錯:bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
原因:不可以使用 BeautifulSoup(html,'html_parser')
解決辦法:
1.安裝 pip install lxml
2.將BeautifulSoup(html,'html_parser') 改為BeautifulSoup(html,'lxml')
————————————————
版權聲明:本文為CSDN博主「西域孤狼」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/matlab001/article/details/83856642