處理bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. 問題
編譯器:pycharm
python版本:3.7.1
lxml版本:4.2.5
場景描述:BeautifulSoup在解析時用lxml解析器運行下列代碼會報錯
報錯如下:
經歷了去網上查找辦法:
1.把soup=BeautifulSoup(markup,‘lxml’)中的解析器“lxml”換成python的標準庫“html.parser”,即
soup=BeautifulSoup(markup...
原创
2019-01-19 19:04:30 ·
1507 阅读 ·
3 评论