From 8e4df3830e6f68b691cb833415d30ab5d37338c9 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 4 Mar 2024 13:48:26 +0300 Subject: [PATCH] Fix(Robots/bkmk_rrequests): No need to re-check error 404 via proxy --- Robots/bkmk_rrequests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Robots/bkmk_rrequests.py b/Robots/bkmk_rrequests.py index 08fe09e..4612a8d 100644 --- a/Robots/bkmk_rrequests.py +++ b/Robots/bkmk_rrequests.py @@ -51,14 +51,14 @@ class robot_requests(robot_base): error, r = request_get(url, headers, self.timeout, None) if error is not None: self.log(' Error: %s' % error) - if self.proxy: + if self.proxy and error != '404 not_found': self.log(' Retrying with the proxy...') error, r = request_get(url, headers, self.timeout, self.proxy) if error is None: self.proxy_ok.add(url_host) if error is not None: - if self.proxy: + if self.proxy and error != '404 not_found': self.log(' Proxy error: %s' % error) if url_host not in self.proxy_ok: self.proxy_error.add(url_host) -- 2.39.5