How to save Scrapy crawl Command output

后端 未结 7 1793
太阳男子
太阳男子 2021-02-01 10:06

I am trying to save the output of the scrapy crawl command I have tried scrapy crawl someSpider -o some.json -t json >> some.text But it doesn\'t worked ...c

7条回答
  •  花落未央
    2021-02-01 10:50

    You can add these lines to your settings.py:

    LOG_STDOUT = True
    LOG_FILE = '/tmp/scrapy_output.txt'
    

    And then start your crawl normally:

    scrapy crawl someSpider
    

提交回复
热议问题