This commit is contained in:
Alhaziel01
2020-05-21 12:29:58 +02:00
parent 573e6fb3c1
commit e30fcc0ef2

View File

@@ -12,15 +12,9 @@ from platformcode import logger, config
def findhost():
page = httptools.downloadpage('https://cb01.uno/')
# permUrl = page.headers
# if 'location' in permUrl:
# if 'google' in permUrl['location']:
# host = permUrl['location'].replace('https://www.google.it/search?q=site:', '')
# else:
# host = permUrl['location']
# else:
host = support.match(page.data, patron=r'<a href="([^"]+)').match
host = httptools.downloadpage('https://cb01.uno/', follow_redirect=True).url
if host == 'https://cb01.uno/':
host = support.match(host, patron=r'<a href="([^"]+)', debug=True).match
return host