Aqua-Dream / Tieba_Spider

百度贴吧爬虫(基于scrapy和mysql)
404 stars 116 forks source link

AttributeError: 'list' object has no attribute 'values'求解答大佬 #35

Closed DeakosS closed 3 years ago

DeakosS commented 3 years ago

爬了几页就开始报这个错误orz


2021-04-14 19:48:51 [scrapy.core.scraper] ERROR: Spider error processing <GET https://tieba.baidu.com/p/totalComment?tid=6423482591&fid=1&pn=33&red_tag=2930056521> (referer: None) Traceback (most recent call last): File "h:\python38\lib\site-packages\scrapy\utils\defer.py", line 120, in iter_errback yield next(it) File "h:\python38\lib\site-packages\scrapy\utils\python.py", line 353, in next return next(self.data) File "h:\python38\lib\site-packages\scrapy\utils\python.py", line 353, in next return next(self.data) File "h:\python38\lib\site-packages\scrapy\core\spidermw.py", line 56, in _evaluate_iterable for r in iterable: File "h:\python38\lib\site-packages\scrapy\spidermiddlewares\offsite.py", line 29, in process_spider_output for x in result: File "h:\python38\lib\site-packages\scrapy\core\spidermw.py", line 56, in _evaluate_iterable for r in iterable: File "h:\python38\lib\site-packages\scrapy\spidermiddlewares\referer.py", line 342, in return (_set_referer(r) for r in result or ()) File "h:\python38\lib\site-packages\scrapy\core\spidermw.py", line 56, in _evaluate_iterable for r in iterable: File "h:\python38\lib\site-packages\scrapy\spidermiddlewares\urllength.py", line 40, in return (r for r in result or () if _filter(r)) File "h:\python38\lib\site-packages\scrapy\core\spidermw.py", line 56, in _evaluate_iterable for r in iterable: File "h:\python38\lib\site-packages\scrapy\spidermiddlewares\depth.py", line 58, in return (r for r in result or () if _filter(r)) File "h:\python38\lib\site-packages\scrapy\core\spidermw.py", line 56, in _evaluate_iterable for r in iterable: File "C:\Users\Administrator\Desktop\Tieba_Spider-master\tieba\spiders\tieba_spider.py", line 92, in parse_totalComment for value in comment_list.values(): AttributeError: 'list' object has no attribute 'values'