Suppose I have a code, where I run the scrapy crawler with python.
process = CrawlerProcess({
'USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)'
})
data = str(self.prothom_date_lineedit.text())
process.crawl(ArticleCommentsSpider, data)
self.statusBar.showMessage("Scraping from prothom alo")
process.start() # this starts the crawling. But I want to save the json file to a file.
As in command line, I always use scrapy crawl <proj_name> -o out.json.
How do I use this -o out.json in python?