miglioramenti scraper vcrypt
This commit is contained in:
+6
-2
@@ -496,13 +496,17 @@ class UnshortenIt(object):
|
|||||||
uri = uri.replace('wss/', 'wss1/')
|
uri = uri.replace('wss/', 'wss1/')
|
||||||
uri = uri.replace('wsd/', 'wsd1/')
|
uri = uri.replace('wsd/', 'wsd1/')
|
||||||
r = httptools.downloadpage(uri, timeout=self._timeout, headers=headers, follow_redirects=False)
|
r = httptools.downloadpage(uri, timeout=self._timeout, headers=headers, follow_redirects=False)
|
||||||
|
if 'Wait 1 hour' in r.data:
|
||||||
|
uri = ''
|
||||||
|
logger.info('IP bannato da vcrypt, aspetta un ora')
|
||||||
|
else:
|
||||||
uri = r.headers['location']
|
uri = r.headers['location']
|
||||||
|
|
||||||
if "4snip" in uri:
|
if "4snip" in uri:
|
||||||
if 'out_generator' in uri:
|
if 'out_generator' in uri:
|
||||||
uri = re.findall('url=(.*)$', uri)[0]
|
uri = re.findall('url=(.*)$', uri)[0]
|
||||||
else:
|
elif '/decode/' in uri:
|
||||||
uri = decrypt(uri)
|
uri = decrypt(uri.split('/')[-1])
|
||||||
|
|
||||||
return uri, r.code if r else 200
|
return uri, r.code if r else 200
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user