if url_host in self.proxy_error:
return 'see prev. error', None, None, None, None
+ use_proxy = False
if url_host in self.proxy_ok:
+ use_proxy = True
self.log(' Immediately trying with the proxy')
error, http_status_code, redirect_to, headers, content = \
self.get(bookmark, url,
):
self.log(' Error : %s' % error)
if self.proxy and http_status_code != 404:
+ use_proxy = True
self.log(' Retrying with the proxy...')
error, http_status_code, redirect_to, headers, content = \
self.get(bookmark, url,
if error is None:
self.proxy_ok.add(url_host)
if error is not None:
- if self.proxy and http_status_code != 404:
+ if use_proxy:
self.log(' Proxy error : %s' % error)
if url_host not in self.proxy_ok:
self.proxy_error.add(url_host)