Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to retry for 404 link not found in scrapy?

Tags:

scrapy

Some sites give 404 error temporarily. But I paste in on browser it works. How to tell scrapy to retry the 404 status code links for 5 times.

like image 711
nizam.sp Avatar asked Jan 07 '12 09:01

nizam.sp


1 Answers

There are two Scrapy settings relevant to what you need:

  • RETRY_HTTP_CODES: you should override the default value in your project to include 404
  • RETRY_TIMES: just set it to 5
like image 77
Pablo Hoffman Avatar answered Sep 23 '22 11:09

Pablo Hoffman