From eb19dd5cf941030fce38c2791026ea02ce6b7ad2 Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Tue, 29 Oct 2024 00:13:42 +0800 Subject: [PATCH] fix --- Comics/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Comics/settings.py b/Comics/settings.py index 66c0901..8386096 100644 --- a/Comics/settings.py +++ b/Comics/settings.py @@ -24,7 +24,7 @@ USER_AGENT = UserAgent().random # Obey robots.txt rules ROBOTSTXT_OBEY = False -HTTPERROR_ALLOWED_CODES = [ 200 , 403] +HTTPERROR_ALLOWED_CODES = [ 200 , 403, 301, 302] # Configure maximum concurrent requests performed by Scrapy (default: 16) CONCURRENT_REQUESTS = 16 @@ -39,6 +39,7 @@ COMIC_INFO_XML_STORE = IMAGES_STORE # 随机化下载延迟 # RANDOMIZE_DOWNLOAD_DELAY = True #重试 +DOWNLOAD_DELAY = 1 # 每次请求间隔2秒 # 增加下载超时时间 DOWNLOAD_TIMEOUT = 30 # 30秒 # 增加重试之间的延迟