进入scrapy shell交互终端
scrapy shell url
settings配置文件
NUMBER = 1
可以通过 spider对象调用
class SunshineSpider(scrapy.Spider):
# spider对象
def parse(self, response):
self.settings.get('NUMBER')
class SpideranythingPipeline(object):
def process_item(self, item, spider):
spider.settings.get('NUMBER', '')