Fix tantiflm, animealtadefinizione utiltimi ep e nascosti ep non ancora caricati

This commit is contained in:
mac12m99
2021-10-27 19:34:39 +02:00
parent 9dcd33ac07
commit ae93e4d1f6
6 changed files with 22 additions and 9 deletions

View File

@@ -43,6 +43,7 @@ class UnshortenIt(object):
_stayonline_regex = r'stayonline\.pro'
_snip_regex = r'[0-9a-z]+snip\.|uprotector\.xyz'
_linksafe_regex = r'linksafe\.cc'
_protectlink_regex = r'(?:s\.)?protectlink\.stream'
# for services that only include real link inside iframe
_simple_iframe_regex = r'cryptmango|xshield\.net|vcrypt\.club|isecure\.link'
# for services that only do redirects
@@ -50,7 +51,7 @@ class UnshortenIt(object):
listRegex = [_adfly_regex, _linkbucks_regex, _adfocus_regex, _lnxlu_regex, _shst_regex, _hrefli_regex, _anonymz_regex,
_shrink_service_regex, _rapidcrypt_regex, _simple_iframe_regex, _linkup_regex, _linkhub_regex,
_swzz_regex, _stayonline_regex, _snip_regex, _linksafe_regex, _simple_redirect]
_swzz_regex, _stayonline_regex, _snip_regex, _linksafe_regex, _protectlink_regex, _simple_redirect]
_maxretries = 5
@@ -101,6 +102,8 @@ class UnshortenIt(object):
uri, code = self._unshorten_snip(uri)
if re.search(self._linksafe_regex, uri, re.IGNORECASE):
uri, code = self._unshorten_linksafe(uri)
if re.search(self._protectlink_regex, uri, re.IGNORECASE):
uri, code = self._unshorten_protectlink(uri)
if re.search(self._simple_redirect, uri, re.IGNORECASE):
p = httptools.downloadpage(uri)
uri = p.url
@@ -674,6 +677,11 @@ class UnshortenIt(object):
def _unshorten_linksafe(self, uri):
return b64decode(uri.split('?url=')[-1]).decode(), 200
def _unshorten_protectlink(self, uri):
if '?data=' in uri:
return b64decode(uri.split('?data=')[-1]).decode(), 200
else:
return httptools.downloadpage(uri, only_headers=True, follow_redirects=False).headers.get('location', uri), 200
def decrypt_aes(text, key):
try: