Reputation: 65
I'm able to run a scrapy spider from a script. But I want to store the output in a specific file(say output.json) in json format. I did a lot of research & also tried to override FEED_URI & FEED_FORMAT from settings. I also tried to use JsonItemExporter function but all in vain. Any help will be appreciated. Thanks!
Upvotes: 1
Views: 559
Reputation: 3068
Use either of the following commands
scrapy crawl yourspidername --set FEED_URI=output.json --set FEED_FORMAT=json
scrapy crawl yourspidername -o output.json -t json
Upvotes: 0
Reputation: 387
I think you should use scrapy crawl yourspider -o output.json -t json
where -o output filename and -t output format.
Upvotes: 2