From: Oleg Broytman Date: Mon, 4 Mar 2024 10:48:26 +0000 (+0300) Subject: Fix(Robots/bkmk_rrequests): No need to re-check error 404 via proxy X-Git-Tag: 5.2.4~2 X-Git-Url: https://git.phdru.name/?p=bookmarks_db.git;a=commitdiff_plain;h=8e4df3830e6f68b691cb833415d30ab5d37338c9 Fix(Robots/bkmk_rrequests): No need to re-check error 404 via proxy --- 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)