Scrapy : storing the data

前端 未结 2 428

I\'m new with python and scrapy. I\'m tring to follow the Scrapy tutorial but I don\'t understand the logic of the storage step.

scrapy crawl spidername -o items         


        
2条回答
  •  情深已故
    2021-02-03 11:28

    --set

    Arguments provided by the command line are the ones that take precedence, overriding any other options.

    You can explicitly override one (or more) settings using the -s (or --set) command line option.

    Example:
    
        scrapy crawl myspider -s LOG_FILE=scrapy.log
    
        sets the LOG_FILE settings value to `scrapy.log`
    

    -o

    Specifies the output filename and extension WHERE you will write the scraped data to

    Examples: 
        scrapy crawl quotes -o items.csv
        scrapy crawl quotes -o items.json
        scrapy crawl quotes -o items.xml
    

    -t

    Specifies the serialisation format or HOW the items are written

    https://www.tutorialspoint.com/scrapy/scrapy_settings.htm

提交回复
热议问题