Sep-11-2022, 03:38 AM
(Sep-06-2022, 01:59 PM)snippsat Wrote:(Sep-06-2022, 12:25 PM)JonWayn Wrote: I there a switch that I can pass to 'scrapy crawl SpiderName -o ExportFilePath' that will force an overwrite if the file previously existed?G:\div_code\scrapy_stuff λ scrapy commands --help Usage ===== scrapy commands Options ======= -h, --help show this help message and exit -a NAME=VALUE set spider argument (may be repeated) -o FILE, --output FILE append scraped items to the end of FILE (use - for stdout) -O FILE, --overwrite-output FILE dump scraped items into FILE, overwriting any existing file -t FORMAT, --output-format FORMAT format to use for dumping items Global Options -------------- --logfile FILE log file. if omitted stderr will be used -L LEVEL, --loglevel LEVEL log level (default: DEBUG) --nolog disable logging completely --profile FILE write python cProfile stats to FILE --pidfile FILE write process ID to FILE -s NAME=VALUE, --set NAME=VALUE set/override setting (may be repeated) --pdb enable pdb on failureSo instead of-o
pass inn-O
.
scrapy crawl SpiderName -O ExportFilePath
Thank you