Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser

python3.6.3   html

我在處理爬蟲時候使用BeautifulSoup中遇到報錯python

「 bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?  」ui

在查閱資料中偶遇一種簡單的解決方式:把代碼中的'lxml'改爲'html.parser'後成功解決。
spa

相關文章
相關標籤/搜索