From adf61f2a9e5e7ffbb657238ccd2eda309055aec1 Mon Sep 17 00:00:00 2001 From: cooper Date: Tue, 18 Jun 2024 21:37:45 +0800 Subject: [PATCH] add 460 454 error --- newsspider/middlewares.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newsspider/middlewares.py b/newsspider/middlewares.py index f13b799..c354599 100644 --- a/newsspider/middlewares.py +++ b/newsspider/middlewares.py @@ -32,7 +32,7 @@ class ProxyMiddleware: def process_response(self, request, response, spider): # 如果响应正常,返回响应 - if response.status in [200, 301, 302]: + if response.status in [200, 301, 302, 460, 454]: return response # 如果响应异常,处理失败计数 else: