只能爬一个网页,第二个就显示failed
用的是python3,求助
用的是python3,求助
2017-10-02
craw 1 : https://baike.baidu.com/item/%E5%90%B4%E4%BA%A6%E5%87%A1/8325774?fr=aladdin
Traceback (most recent call last):
File "D:\Documents\Downloads\eclipse\eclipse练习\1\kris\spider_main.py", line 53, in <module>
obj_spider.craw(root_url)
File "D:\Documents\Downloads\eclipse\eclipse练习\1\kris\spider_main.py", line 28, in craw
new_urls, new_data = self.parser.parse(new_url, html_cont)
TypeError: 'NoneType' object is not iterable
请问各位大神 这个问题什么意思
crawl 1 : https://baike.baidu.com/item/Python/407313?fr=aladdin
Traceback (most recent call last):
File "D:\Eclipse\project\crawl\school\spider_main.py", line 39, in <module>
obj_spider.craw(root_url)
File "D:\Eclipse\project\crawl\school\spider_main.py", line 23, in craw
new_urls, new_data = self.parser.parse(new_url, html_cont)
File "D:\Eclipse\project\crawl\school\html_parser.py", line 41, in parse
soup = BeautifulSoup(html_cont, 'html_parser', from_encoding='utf-8')
File "build\bdist.win-amd64\egg\bs4\__init__.py", line 165, in __init__
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: html_parser. Do you need to install a parser library?
什么原因
举报