I am using Scrapy to crawl several websites, and need the output to be in JSON. I have set the command:
scrapy crawl MySpider -o "path/to/output.json" -t json
That works, however, now I need to add stats to output - the list of requests, errors, types of errors (404s, etc.). Also, I need the output file to be rewritten, not appended to. I can't find any instructions how to do this.