html.paser的錯誤
錯誤提示如下:
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: html.paser. Do you need to install a parser library?
我用lxml和html5lib都可以,為什么自帶的parser不能用呢?
錯誤提示如下:
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: html.paser. Do you need to install a parser library?
我用lxml和html5lib都可以,為什么自帶的parser不能用呢?
2015-12-18
舉報
2015-12-18
正常情況下html.parser默認(rèn)是具備的,出現(xiàn)這種錯誤,可以檢查一下bs的版本和python的版本,是不是適配。
在http://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser這個鏈接可以看到,
Python’s html.parser?Not very lenient (before Python 2.7.3 or 3.2.2)
請檢查下Python的版本吧
? ?
2016-08-01
能幫個忙嗎?