按代码来敲报错,求解
为什么按代码来敲报错。
Traceback (most recent call last):
File "F:\pytest\project\spider_main.py", line 36, in <module>
obj_spider.craw(root_url)
File "F:\pytest\project\spider_main.py", line 14, in craw
self.urls.add_new_url(root_url)#添加入口url
File "F:\pytest\project\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 'old_urls'