I am looking to handle a DNS error when scraping domains Scrapy.
Here's the error that I am seeing:
ERROR: Error downloading <GET http://domain.com>: DNS lookup failed: address 'domain.com' not found [Errno 8] nodename nor servname provided, or not known.
How could I be notified when I get an error like this, so that I can handle it myself without Scrapy just throwing an error and moving on.
Use errback
along with callback:
Request(url, callback=your_callback, errback=your_errorback)
and errback
:
def your_errorback(self, response):
//your logic will be here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With