python - Run Scrapy spider via script & configure the settings for output file -


I sparr a spider & amp; Run it in a dragon script (not scrapy cmd prompt) I want to configure settings so that to get scraped data into a particular file (called output.json).

At the prompt, I can get results when I run the following command: "Scary crawl miceider - o scrapedData.json -t json"

but I do not have a script through the CDDline tool I want to have the same output by running.

Thanks for any help!

  settings = get_project_settings () settings.overrides ['FEED_URI'] = 'deals output.jason ' Settings. Override ['FEED_FORMAT'] = 'Json' spider = deals () crawler = crawler (settings)  

I found this code by looking at:


Comments