weibo-search icon indicating copy to clipboard operation
weibo-search copied to clipboard

作者你好,运行您的代码出错,没有任何结果,可以请教您一下吗

Open Yangkuishiny opened this issue 3 years ago • 3 comments

2022-06-25 22:05:29 [scrapy.core.scraper] ERROR: Spider error processing <GET https://s.weibo.com/weibo?q=%E6%95%B0%E6%8D%AE%E6%B5%81%E9%80%9A&scope=ori&suball=1&timescope=custom:2022-06-01-0:2022-06-06-0> (referer: None) Traceback (most recent call last): File "/home/song/anaconda3/lib/python3.8/site-packages/scrapy/utils/defer.py", line 132, in iter_errback yield next(it) File "/home/song/anaconda3/lib/python3.8/site-packages/scrapy/utils/python.py", line 354, in next return next(self.data) File "/home/song/anaconda3/lib/python3.8/site-packages/scrapy/utils/python.py", line 354, in next return next(self.data) File "/home/song/anaconda3/lib/python3.8/site-packages/scrapy/core/spidermw.py", line 66, in _evaluate_iterable for r in iterable: File "/home/song/anaconda3/lib/python3.8/site-packages/scrapy/spidermiddlewares/offsite.py", line 29, in process_spider_output for x in result: File "/home/song/anaconda3/lib/python3.8/site-packages/scrapy/core/spidermw.py", line 66, in _evaluate_iterable for r in iterable: File "/home/song/anaconda3/lib/python3.8/site-packages/scrapy/spidermiddlewares/referer.py", line 342, in return (_set_referer(r) for r in result or ()) File "/home/song/anaconda3/lib/python3.8/site-packages/scrapy/core/spidermw.py", line 66, in _evaluate_iterable for r in iterable: File "/home/song/anaconda3/lib/python3.8/site-packages/scrapy/spidermiddlewares/urllength.py", line 40, in return (r for r in result or () if _filter(r)) File "/home/song/anaconda3/lib/python3.8/site-packages/scrapy/core/spidermw.py", line 66, in _evaluate_iterable for r in iterable: File "/home/song/anaconda3/lib/python3.8/site-packages/scrapy/spidermiddlewares/depth.py", line 58, in return (r for r in result or () if _filter(r)) File "/home/song/anaconda3/lib/python3.8/site-packages/scrapy/core/spidermw.py", line 66, in _evaluate_iterable for r in iterable: File "/home/song/下载/weibo-search/weibo/spiders/search.py", line 107, in parse for weibo in self.parse_weibo(response): File "/home/song/下载/weibo-search/weibo/spiders/search.py", line 425, in parse_weibo attitudes_count = re.findall(r'\d+.*', attitudes_count) File "/home/song/anaconda3/lib/python3.8/re.py", line 241, in findall return _compile(pattern, flags).findall(string) TypeError: expected string or bytes-like object

Yangkuishiny avatar Jun 25 '22 14:06 Yangkuishiny

我解决了,翻了之前的问题,找到了解决办法,直接scrapy crawl search就可以了

Yangkuishiny avatar Jun 26 '22 03:06 Yangkuishiny

和题主一样的问题 两个月前使用过没有问题 现在出现和题主一样的问题 直接scrapy crawl search报错和题主一样

1933211129 avatar Jun 28 '22 00:06 1933211129

已解决!!更新一下cookie!

1933211129 avatar Jun 28 '22 00:06 1933211129