只爬取了一行 就出現(xiàn)了下面得到問題
craw 1 : https://baike.baidu.com/item/Python/407313
Traceback (most recent call last):
? File "E:\eclipse-jee-neon\新建文件夾\pc\src\baike_spider\spider_main.py", line 39, in <module>
??? obj_spider.craw(root_url)
? File "E:\eclipse-jee-neon\新建文件夾\pc\src\baike_spider\spider_main.py", line 20, in craw
??? new_urls, new_data = self.parser.parse(new_url,html_cont)
? File "E:\eclipse-jee-neon\新建文件夾\pc\src\baike_spider\html_parser.py", line 38, in parse
??? soup = BeautifulSoup(html_cont,'html.parser',from_encoding='utf-8')
TypeError: 'module' object is not callable
2018-06-21
導(dǎo)入BeautifulSoup了么
from bs4 import BeautifulSoup