爬虫报错:Do you need to install a parser library?
环境是windows8下的pycharm,爬的百度也有https
因为爬失败所以去掉了spider_main.py中的try,expect
发现返回报错:
craw 1 : https://baike.baidu.com/item/Python/407313?fr=aladdin
Traceback (most recent call last):
File "S:/baike_spider/spider_main.py", line 43, in <module>
obj_spider.craw(root_url) # 启动爬虫
File "S:/baike_spider/spider_main.py", line 27, in craw
new_urls, new_data = self.parser.parse(new_url, html_cont) # 新的列表
File "S:\baike_spider\html_parser.py", line 39, in parse
soup = BeautifulSoup(html_cont, 'html_parser', from_encoding='utf-8')
File "E:\Tools\Python\Python3.5\lib\site-packages\bs4\__init__.py", line 165, 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?
好像是解析器的问题,求解谢谢