報這個錯?請問是什么原因?謝謝
Traceback (most recent call last):
? File "G:\test\imooc_spider\baike_spider\spider_main.py", line 46, in <module>
? ? obj_spider.craw(root_url)
? File "G:\test\imooc_spider\baike_spider\spider_main.py", line 24, in craw
? ? new_urls, new_data = self.parser.parse(new_url,html_cont)
? File "G:\test\imooc_spider\baike_spider\html_parser.py", line 45, in parse
? ? soup = BeautifulSoup(html_cont,'html_parser',from_encoding="utf-8")
? File "C:\Python27\lib\site-packages\bs4\__init__.py", line 152, in __init__
? ? % ",".join(features))
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: html_parser. Do you need to install a parser library?
2017-02-26
soup = BeautifulSoup(html_cont,'html.parser',from_encoding="utf-8")
2017-11-28
沒有html_parser??
要改成html.parser
如樓上