fix ilgenio e vcrypt su kodi 19
This commit is contained in:
@@ -25,10 +25,10 @@ BASE_URL_TRANSLATE = 'https://translate.google.com/translate?hl=it&sl=en&tl=it&u
|
||||
|
||||
|
||||
def checker_url(html, url):
|
||||
grep_regex = re.findall(r'href="|src="|value="|((?:http[s]://|ftp[s]://)+\.*([-a-zA-Z0-9\.]+)([-a-zA-Z0-9\.]){1,}([-a-zA-Z0-9_\.\#\@\:%_/\?\=\~\&\-\//\!\'\;\(\)\s\^\:blank:\:punct:\:xdigit:\:space:\$]+))', html) # noqa: E501
|
||||
grep_regex = re.findall(r'(?:href="|src="|value=")([^"]+)', html) # noqa: E501
|
||||
for url_result_regex in grep_regex:
|
||||
if url in url_result_regex[0]:
|
||||
return url_result_regex[0].replace('&', '&')
|
||||
if url in url_result_regex:
|
||||
return url_result_regex.replace('&', '&')
|
||||
|
||||
|
||||
def process_request_proxy(url):
|
||||
@@ -60,7 +60,7 @@ def process_request_proxy(url):
|
||||
)
|
||||
|
||||
url_request_proxy = checker_url(
|
||||
request_final.text, BASE_URL_PROXY + '/translate_c?depth=1')
|
||||
request_final.text, 'translate.google')
|
||||
|
||||
logger.debug(url_request_proxy)
|
||||
|
||||
|
||||
+1
-2
@@ -532,7 +532,7 @@ class UnshortenIt(object):
|
||||
spl = uri.split('/')
|
||||
spl[3] += '1'
|
||||
if spl[3] == 'wss1':
|
||||
spl[4] = b64encode(spl[4])
|
||||
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)
|
||||
if 'Wait 1 hour' in r.data:
|
||||
@@ -544,7 +544,6 @@ class UnshortenIt(object):
|
||||
if uri == prev_uri:
|
||||
logger.info('Use Cloudscraper')
|
||||
uri = httptools.downloadpage(uri, timeout=self._timeout, headers=headers, follow_redirects=False, cf=True).headers['location']
|
||||
# from core.support import dbg;dbg()
|
||||
if "snip." in uri:
|
||||
if 'out_generator' in uri:
|
||||
uri = re.findall('url=(.*)$', uri)[0]
|
||||
|
||||
Reference in New Issue
Block a user