scrapy中的pipeline中的process_item无法调用执行

阅读 54

2022-08-09


1、正确配置settings.py文件
2、爬虫文件parse()函数一定要有yield语句 即yield item

遇到这个问题时还应该注意 pipeLine中间件在settIng里面设置的序号。如果你写了下载器中间件 ,那么下载器中间件在setting序号要小于 pipeline的序号。。相关连接 ​​https://stackoverflow.com/questions/31331411/python-scrapy-pipeline-function-process-item-not-getting-called​​


精彩评论(0)

0 0 举报