fix updateDomains
This commit is contained in:
@@ -58,8 +58,6 @@ if __name__ == '__main__':
|
|||||||
# redirect
|
# redirect
|
||||||
elif str(rslt['code']).startswith('3'):
|
elif str(rslt['code']).startswith('3'):
|
||||||
# result[chann] = str(rslt['code']) +' - '+ rslt['redirect'][:-1]
|
# result[chann] = str(rslt['code']) +' - '+ rslt['redirect'][:-1]
|
||||||
if rslt['redirect'].endswith('/'):
|
|
||||||
rslt['redirect'] = rslt['redirect'][:-1]
|
|
||||||
result[chann] = rslt['redirect']
|
result[chann] = rslt['redirect']
|
||||||
# cloudflare...
|
# cloudflare...
|
||||||
elif rslt['code'] in [429, 503, 403]:
|
elif rslt['code'] in [429, 503, 403]:
|
||||||
@@ -69,7 +67,7 @@ if __name__ == '__main__':
|
|||||||
print('Cloudflare riconosciuto')
|
print('Cloudflare riconosciuto')
|
||||||
try:
|
try:
|
||||||
page_data = proxytranslate.process_request_proxy(host).get('data', '')
|
page_data = proxytranslate.process_request_proxy(host).get('data', '')
|
||||||
result[chann] = re.search('<base href="([^"]+)/', page_data).group(1)
|
result[chann] = re.search('<base href="([^"]+)', page_data).group(1)
|
||||||
rslt['code_new'] = 200
|
rslt['code_new'] = 200
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
import traceback
|
import traceback
|
||||||
@@ -85,6 +83,8 @@ if __name__ == '__main__':
|
|||||||
print('Errore Sconosciuto - '+str(rslt['code']) +' - '+ host)
|
print('Errore Sconosciuto - '+str(rslt['code']) +' - '+ host)
|
||||||
|
|
||||||
print("check #### FINE #### rslt :%s " % (rslt))
|
print("check #### FINE #### rslt :%s " % (rslt))
|
||||||
|
if result[chann].endswith('/'):
|
||||||
|
result[chann] = result[chann][:-1]
|
||||||
|
|
||||||
result = {'findhost': data['findhost'], 'direct': result}
|
result = {'findhost': data['findhost'], 'direct': result}
|
||||||
# I write the updated file
|
# I write the updated file
|
||||||
|
|||||||
Reference in New Issue
Block a user