fix tests

This commit is contained in:
mac12m99
2021-01-25 13:37:02 +01:00
parent 2c84897674
commit 03a5253e0e
2 changed files with 12 additions and 5 deletions

View File

@@ -418,7 +418,7 @@ def downloadpage(url, **opt):
response['data'] = response['data'].decode('ISO-8859-1')
if req.headers.get('Server', '').startswith('cloudflare') and response_code in [429, 503, 403]\
and not opt.get('CF', False) and 'Please turn JavaScript on and reload the page' in response['data']:
and not opt.get('CF', False) and 'Cloudflare Ray ID' in response['data']:
logger.debug("CF retry... for domain: %s" % domain)
from lib import proxytranslate
gResp = proxytranslate.process_request_proxy(url)