|
|
@ -34,8 +34,11 @@ class Cache(object):
|
|
|
|
dns = f'{codename}.node.{config.DO_DOMAIN}'
|
|
|
|
dns = f'{codename}.node.{config.DO_DOMAIN}'
|
|
|
|
url = f'https://{dns}/tor/'
|
|
|
|
url = f'https://{dns}/tor/'
|
|
|
|
r = r_get(url, timeout=6)
|
|
|
|
r = r_get(url, timeout=6)
|
|
|
|
data = r.text.strip()
|
|
|
|
if r.text:
|
|
|
|
self.store_data(key_name, 86400, data)
|
|
|
|
data = r.text.strip()
|
|
|
|
|
|
|
|
self.store_data(key_name, 86400, data)
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
data = ''
|
|
|
|
return data
|
|
|
|
return data
|
|
|
|
except:
|
|
|
|
except:
|
|
|
|
return {'error': 'true'}
|
|
|
|
return {'error': 'true'}
|
|
|
|