错误信息:
2019-12-24 19:17:20 [twisted] CRITICAL:
Traceback (most recent call last):
File "C:\Users\Tommy\Envs\py36x64\lib\site-packages\twisted\internet\task.py", line 517, in _oneWorkUnit
result = next(self._iterator)
File "C:\Users\Tommy\Envs\py36x64\lib\site-packages\scrapy\utils\defer.py", line 63, in <genexpr>
work = (callable(elem, *args, **named) for elem in iterable)
File "C:\Users\Tommy\Envs\py36x64\lib\site-packages\scrapy\core\scraper.py", line 184, in _process_spidermw_output
self.crawler.engine.crawl(request=output, spider=spider)
File "C:\Users\Tommy\Envs\py36x64\lib\site-packages\scrapy\core\engine.py", line 210, in crawl
self.schedule(request, spider)
File "C:\Users\Tommy\Envs\py36x64\lib\site-packages\scrapy\core\engine.py", line 216, in schedule
if not self.slot.scheduler.enqueue_request(request):
File "C:\Users\Tommy\Envs\py36x64\lib\site-packages\scrapy_redis\scheduler.py", line 167, in enqueue_request
self.queue.push(request)
File "C:\Users\Tommy\Envs\py36x64\lib\site-packages\scrapy_redis\queue.py", line 99, in push
data = self._encode_request(request)
File "C:\Users\Tommy\Envs\py36x64\lib\site-packages\scrapy_redis\queue.py", line 43, in _encode_request
return self.serializer.dumps(obj)
File "C:\Users\Tommy\Envs\py36x64\lib\site-packages\scrapy_redis\picklecompat.py", line 14, in dumps
return pickle.dumps(obj, protocol=-1)
File "C:\Users\Tommy\Envs\py36x64\lib\site-packages\parsel\selector.py", line 204, in __getstate__
raise TypeError("can't pickle Selector objects")
TypeError: can't pickle Selector objects
请问老师知道这个怎么解决吗,我搜了好久没搜到,谢谢老师
带你彻底掌握Scrapy,用Django+Elasticsearch搭建搜索引擎
了解课程