2021-12-06 00:16:15 [scrapy.core.scraper] ERROR: Spider error processing <GET https://s.weibo.com/weibo?q=%E8%80%81%E6%97%A7%E5%B0%8F%E5%8C%BA&typeall=1&su
ball=1×cope=custom:2021-04-18-0:2021-04-19-0&page=1&sudaref=s.weibo.com&display=0&retcode=6102> (referer: https://s.weibo.com/weibo?q=%E8%80%81%E6%97%
A7%E5%B0%8F%E5%8C%BA&typeall=1&suball=1×cope=custom:2021-01-01-0:2021-07-01-0)
Traceback (most recent call last):
File "d:\软件安装\python\lib\site-packages\scrapy\utils\defer.py", line 120, in iter_errback
yield next(it)
File "d:\软件安装\python\lib\site-packages\scrapy\utils\python.py", line 353, in next
return next(self.data)
File "d:\软件安装\python\lib\site-packages\scrapy\utils\python.py", line 353, in next
return next(self.data)
File "d:\软件安装\python\lib\site-packages\scrapy\core\spidermw.py", line 56, in _evaluate_iterable
for r in iterable:
File "d:\软件安装\python\lib\site-packages\scrapy\spidermiddlewares\offsite.py", line 29, in process_spider_output
for x in result:
File "d:\软件安装\python\lib\site-packages\scrapy\core\spidermw.py", line 56, in _evaluate_iterable
for r in iterable:
File "d:\软件安装\python\lib\site-packages\scrapy\spidermiddlewares\referer.py", line 342, in
return (_set_referer(r) for r in result or ())
File "d:\软件安装\python\lib\site-packages\scrapy\core\spidermw.py", line 56, in _evaluate_iterable
for r in iterable:
File "d:\软件安装\python\lib\site-packages\scrapy\spidermiddlewares\urllength.py", line 40, in
return (r for r in result or () if _filter(r))
File "d:\软件安装\python\lib\site-packages\scrapy\core\spidermw.py", line 56, in _evaluate_iterable
for r in iterable:
File "d:\软件安装\python\lib\site-packages\scrapy\spidermiddlewares\depth.py", line 58, in
return (r for r in result or () if _filter(r))
File "d:\软件安装\python\lib\site-packages\scrapy\core\spidermw.py", line 56, in _evaluate_iterable
for r in iterable:
File "D:\桌面\weibo-search-master\weibo\spiders\search.py", line 151, in parse_by_day
for weibo in self.parse_weibo(response):
File "D:\桌面\weibo-search-master\weibo\spiders\search.py", line 420, in parse_weibo
comments_count = re.findall(r'\d+.*', comments_count)
File "d:\软件安装\python\lib\re.py", line 222, in findall
return _compile(pattern, flags).findall(string)
TypeError: expected string or bytes-like object
2021-12-06 00:16:15 [scrapy.core.scraper] ERROR: Spider error processing <GET https://s.weibo.com/weibo?q=%E8%80%81%E6%97%A7%E5%B0%8F%E5%8C%BA&typeall=1&su ball=1×cope=custom:2021-04-18-0:2021-04-19-0&page=1&sudaref=s.weibo.com&display=0&retcode=6102> (referer: https://s.weibo.com/weibo?q=%E8%80%81%E6%97% A7%E5%B0%8F%E5%8C%BA&typeall=1&suball=1×cope=custom:2021-01-01-0:2021-07-01-0) Traceback (most recent call last): File "d:\软件安装\python\lib\site-packages\scrapy\utils\defer.py", line 120, in iter_errback yield next(it) File "d:\软件安装\python\lib\site-packages\scrapy\utils\python.py", line 353, in next return next(self.data) File "d:\软件安装\python\lib\site-packages\scrapy\utils\python.py", line 353, in next return next(self.data) File "d:\软件安装\python\lib\site-packages\scrapy\core\spidermw.py", line 56, in _evaluate_iterable for r in iterable: File "d:\软件安装\python\lib\site-packages\scrapy\spidermiddlewares\offsite.py", line 29, in process_spider_output for x in result: File "d:\软件安装\python\lib\site-packages\scrapy\core\spidermw.py", line 56, in _evaluate_iterable for r in iterable: File "d:\软件安装\python\lib\site-packages\scrapy\spidermiddlewares\referer.py", line 342, in
return (_set_referer(r) for r in result or ())
File "d:\软件安装\python\lib\site-packages\scrapy\core\spidermw.py", line 56, in _evaluate_iterable
for r in iterable:
File "d:\软件安装\python\lib\site-packages\scrapy\spidermiddlewares\urllength.py", line 40, in
return (r for r in result or () if _filter(r))
File "d:\软件安装\python\lib\site-packages\scrapy\core\spidermw.py", line 56, in _evaluate_iterable
for r in iterable:
File "d:\软件安装\python\lib\site-packages\scrapy\spidermiddlewares\depth.py", line 58, in
return (r for r in result or () if _filter(r))
File "d:\软件安装\python\lib\site-packages\scrapy\core\spidermw.py", line 56, in _evaluate_iterable
for r in iterable:
File "D:\桌面\weibo-search-master\weibo\spiders\search.py", line 151, in parse_by_day
for weibo in self.parse_weibo(response):
File "D:\桌面\weibo-search-master\weibo\spiders\search.py", line 420, in parse_weibo
comments_count = re.findall(r'\d+.*', comments_count)
File "d:\软件安装\python\lib\re.py", line 222, in findall
return _compile(pattern, flags).findall(string)
TypeError: expected string or bytes-like object