File "E:\Python code\imooc_spider\baike_spider\url_manager.py", line 14, in add_new_url
if url not in self.add_new_urls and url not in self.old_urls:
TypeError: argument of type 'instancemethod' is not iterable
呃。。。。。。把代码看了又看一遍,不懂错在哪里, win10,2.7.12,pycharm
if url not in self.add_new_urls and url not in self.old_urls:
TypeError: argument of type 'instancemethod' is not iterable
呃。。。。。。把代码看了又看一遍,不懂错在哪里, win10,2.7.12,pycharm
2016-08-01
Traceback (most recent call last):
File "E:/Python code/imooc_spider/baike_spider/spider_main.py", line 47, in <module>
obj_spider.craw(root_url)
File "E:/Python code/imooc_spider/baike_spider/spider_main.py", line 22, in craw
self.urls.add_new_url(root_url)
File "E:/Python code/imooc_spider/baike_spider/spider_main.py", line 47, in <module>
obj_spider.craw(root_url)
File "E:/Python code/imooc_spider/baike_spider/spider_main.py", line 22, in craw
self.urls.add_new_url(root_url)
2016-08-01
python 3.x中urllib库和urilib2库合并成了urllib库。。
其中urllib2.urlopen()变成了urllib.request.urlopen()
urllib2.Request()变成了urllib.request.Request()
其中urllib2.urlopen()变成了urllib.request.urlopen()
urllib2.Request()变成了urllib.request.Request()
2016-07-31