raise ValueError, "unknown url type: %s" % self.__original 这是什么情况呀
craw 1 : https://baike.baidu.com/item/PyCharm/8143824?fr=aladdin
craw 2 : /
Traceback (most recent call last):
File "D:/python/baike_spider/spider_main.py", line 39, in <module>
obj_spider.craw(root_url)
File "D:/python/baike_spider/spider_main.py", line 21, in craw
html_cont = self.downloader.download(new_url)
File "D:\python\baike_spider\html_downloader.py", line 11, in download
response = urllib2.urlopen(url)
File "E:\python2\Lib\urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "E:\python2\Lib\urllib2.py", line 421, in open
protocol = req.get_type()
File "E:\python2\Lib\urllib2.py", line 283, in get_type
raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: /