Report scrapy ResponseNeverReceived

Viewed 148

I would like to send status report to a database after a scrapy crawl. I already have a system in place that listens to the spider closed event and sends the reason for closing the spider to the database.

My problem is that I get a twisted.web._newclient.ResponseNeverReceived which ends the spider with CloseSpider('finished'). This reason is not enough for me to deduct the actual reason for failure.

How would you close the spider with a different reason when ResponseNeverReceived occurs? There doesn't seem to be any signals for that.

0 Answers
Related