def do_downloadpage(url, post=None, headers=None): # ~ data = httptools.downloadpage(url, post=post, headers=headers).data data = httptools.downloadpage_proxy('cliver', url, post=post, headers=headers).data if '<title>You are being redirected...</title>' in data: try: from lib import balandroresolver ck_name, ck_value = balandroresolver.get_sucuri_cookie(data) if ck_name and ck_value: # ~ logger.debug('Cookies: %s %s' % (ck_name, ck_value)) httptools.save_cookie(ck_name, ck_value, host.replace('https://', '')[:-1]) # ~ data = httptools.downloadpage(url, post=post, headers=headers).data data = httptools.downloadpage_proxy('cliver', url, post=post, headers=headers).data # ~ logger.debug(data) except: pass return data
def do_downloadpage(url, post=None): ant_hosts = ['http://grantorrent.net/', 'https://grantorrent1.com/', 'https://grantorrent.one/', 'https://grantorrent.tv/', 'https://grantorrent.la/', 'https://grantorrent.io/', 'https://grantorrent.cc/', 'https://grantorrent.li/', 'https://grantorrent.eu/'] for ant in ant_hosts: url = url.replace(ant, host) # por si viene de enlaces guardados # ~ data = httptools.downloadpage(url, post=post).data data = httptools.downloadpage_proxy('grantorrent', url, post=post).data # ~ logger.debug(data) if '<title>You are being redirected...</title>' in data: try: from lib import balandroresolver ck_name, ck_value = balandroresolver.get_sucuri_cookie(data) if ck_name and ck_value: # ~ logger.debug('Cookies: %s %s' % (ck_name, ck_value)) httptools.save_cookie(ck_name, ck_value, host.replace('https://', '')[:-1]) # ~ data = httptools.downloadpage(url, post=post).data data = httptools.downloadpage_proxy('grantorrent', url, post=post).data # ~ logger.debug(data) except: pass return data
def do_downloadpage(url, post=None): url = url.replace( 'http://grantorrent.net/', 'https://grantorrent1.com/') # por si viene de enlaces guardados data = httptools.downloadpage(url, post=post).data # ~ data = httptools.downloadpage_proxy('grantorrent', url, post=post).data # ~ logger.debug(data) if '<title>You are being redirected...</title>' in data: try: from lib import balandroresolver ck_name, ck_value = balandroresolver.get_sucuri_cookie(data) if ck_name and ck_value: httptools.save_cookie(ck_name, ck_value, 'grantorrent1.com') data = httptools.downloadpage(url, post=post).data except: pass return data