Merge remote-tracking branch 'origin/master'

This commit is contained in:
marco
2020-12-21 21:22:44 +01:00
9 changed files with 54 additions and 49 deletions
+2 -2
View File
@@ -534,7 +534,7 @@ class UnshortenIt(object):
if spl[3] == 'wss1':
spl[4] = b64encode(spl[4].encode('utf-8')).decode('utf-8')
uri = '/'.join(spl)
r = httptools.downloadpage(uri, timeout=self._timeout, headers=headers, follow_redirects=False)
r = httptools.downloadpage(uri, timeout=self._timeout, headers=headers, follow_redirects=False, verify=False)
if 'Wait 1 hour' in r.data:
uri = ''
logger.error('IP bannato da vcrypt, aspetta un ora')
@@ -552,7 +552,7 @@ class UnshortenIt(object):
splitted = path.split('/')
splitted[1] = 'outlink'
new_uri = httptools.downloadpage(uri, follow_redirects=False, post={'url': splitted[2]}).headers['location']
if new_uri != uri:
if new_uri and new_uri != uri:
uri = new_uri
else:
uri = httptools.downloadpage(scheme + '://' + netloc + "/".join(splitted) + query + fragment, follow_redirects=False, post={'url': splitted[2]}).headers['location']