You can use the one that comes with scrapyscrapy.downloadermiddlewares.retry.RetryMiddleware中间件,然后通过这几个参数进行配置: RETRY_ENABLED: 是否开启retry RETRY_TIMES: 重试次数 RETRY_HTTP_CODECS: You need to retry when you encounter any http code. The default is 500, 502, 503, 504, 408. Other problems such as network connection timeout will also be automatically retried
You can use the one that comes with scrapy
scrapy.downloadermiddlewares.retry.RetryMiddleware
中间件,然后通过这几个参数进行配置:RETRY_ENABLED
: 是否开启retryRETRY_TIMES
: 重试次数RETRY_HTTP_CODECS
: You need to retry when you encounter any http code. The default is 500, 502, 503, 504, 408. Other problems such as network connection timeout will also be automatically retried