SCRAPY框架执行爬虫无法进入pipeline管道问题

编写完spider、item、pipeline文件直接执行spider看程序是否能够抓取到数据,这时候会发现数据没通过pipeline保存下来,其实是忽略了配置文件setting.py
pipeline.py文件其实有做出提示:

# -*- coding: utf-8 -*-

# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html

所以这时候找到setting.py文件,去掉注释就行啦

ITEM_PIPELINES = {
   'testspider.pipelines.TestspiderPipeline': 300,
}

你可能感兴趣的:(scrapy框架)