I use Scrapy framework to crawl data. My crawler will be interrupted if it encounters a 500 error. So I need to check an available link before I parse a web content.
Is there any approach to resolve my problem?
Thank you so much.
I use Scrapy framework to crawl data. My crawler will be interrupted if it
Share
If the url exists you could use the getcode() method of urllib to check it: