title: scrapy from script output in json
body: <p>I am running <code>scrapy</code> in a python script</p>
  
  <pre><code>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()
  </code></pre>
  
  <p>it runs successfully and stops but where is the result ? I want the result in json format, how can I do that?</p>
  
  <pre><code>result = responseInJSON
  </code></pre>
  
  <p>like we do using command</p>
  
  <pre><code>scrapy crawl argos -o result.json -t json
  </code></pre>