I am running scrapy
in a python script
def setup_crawler(domain):
dispatcher.connect(stop_reactor, signal=signals.spider_closed)
spider = ArgosSpider(domain=domain)
settings = get_project_settings()
crawler = Crawler(settings)
crawler.configure()
crawler.crawl(spider)
crawler.start()
reactor.run()
it runs successfully and stops but where is the result ? I want the result in json format, how can I do that?
result = responseInJSON
like we do using command
scrapy crawl argos -o result.json -t json
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…