照着老师的代码打的,new_urls也定义了,还是报错,求大神指点
Traceback (most recent call last):
File "E:\java\imooc\baike_spider\spider_main.py", line 38, in <module>
obj_spider.craw(root_url)
File "E:\java\imooc\baike_spider\spider_main.py", line 13, in craw
self.urls.add_new_url(root_url)
File "E:\java\imooc\baike_spider\url_manager.py", line 10, in add_new_url
if url not in self.new_urls and url not in self.old_urls:
AttributeError: 'UrlManager' object has no attribute 'new_urls'