AttributeError: 'UrlManager' object has no attribute 'new_urls'
Traceback (most recent call last):
File "H:\python\qthnluwei\src\baike\spider_main.py", line 33, in <module>
obj_Spider.craw(root_url)
File "H:\python\qthnluwei\src\baike\spider_main.py", line 13, in craw
self.urls.add_new_url (root_url)
File "H:\python\qthnluwei\src\baike\url_manager.py", line 11, 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'
根据老师讲的运行了程序,但报错。没有对new_urls定义?请问如何进行处理。