我如何提供从scrapy到python脚本的变量?

时间:2015-06-16 08:58:09

标签: python scrapy

我从python开始scrapy:

from gsaadvantage.spiders.gsaadvantage_crawler import GsaadvantageCrawlerSpiderfrom twisted.internet import reactor
from scrapy.crawler import Crawler
from scrapy import log, signals
from scrapy.utils.project import get_project_settings

spider = GsaadvantageCrawlerSpider()
settings = get_project_settings()
crawler = Crawler(settings)
crawler.signals.connect(reactor.stop, signal=signals.spider_closed)
crawler.configure()
crawler.crawl(spider)
crawler.start()
log.start()
reactor.run() # the script will block here until the spider_closed signal was sent

但是我如何从scrapy(字符串列表)获取数据到python主脚本? 谢谢!

0 个答案:

没有答案