]> git.phdru.name Git - bookmarks_db.git/commitdiff
Fix(Robots/bkmk_rrequests): No need to re-check error 404 via proxy
authorOleg Broytman <phd@phdru.name>
Mon, 4 Mar 2024 10:48:26 +0000 (13:48 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 4 Mar 2024 15:14:32 +0000 (18:14 +0300)
Robots/bkmk_rrequests.py

index 08fe09ebcd830725ebb54263a7d28f7b36d8e79d..4612a8d5384dd2b03a31145132066be3ce33bf77 100644 (file)
@@ -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)