fix ilgenio
This commit is contained in:
@@ -182,13 +182,14 @@ def findvideos(item):
|
||||
if 'player.php' in match:
|
||||
match = support.httptools.downloadpage(match, follow_redirect=True).url
|
||||
list_url.append(match)
|
||||
for i, url in enumerate(list_url):
|
||||
itemlist.append(support.Item(
|
||||
channel=item.channel,
|
||||
title=list_servers[i],
|
||||
url=url,
|
||||
action='play',
|
||||
quality=list_quality[i],
|
||||
infoLabels=item.infoLabels))
|
||||
if list_servers:
|
||||
for i, url in enumerate(list_url):
|
||||
itemlist.append(support.Item(
|
||||
channel=item.channel,
|
||||
title=list_servers[i],
|
||||
url=url,
|
||||
action='play',
|
||||
quality=list_quality[i],
|
||||
infoLabels=item.infoLabels))
|
||||
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
import sys
|
||||
if sys.version_info[0] >= 3:
|
||||
from urllib import request
|
||||
import urllib.parse as urlparse
|
||||
PY3 = True
|
||||
else:
|
||||
PY3 = False
|
||||
import urllib as request
|
||||
import urlparse
|
||||
|
||||
import re
|
||||
import time
|
||||
@@ -36,6 +38,8 @@ def process_request_proxy(url):
|
||||
return
|
||||
|
||||
try:
|
||||
domain = urlparse.urlparse(url).netloc
|
||||
|
||||
target_url = \
|
||||
BASE_URL_TRANSLATE.replace('[TARGET_URL]', request.quote(url))
|
||||
|
||||
@@ -80,6 +84,7 @@ def process_request_proxy(url):
|
||||
|
||||
data = re.sub('\s(\w+)=(?!")([^<>\s]+)', r' \1="\2"', data)
|
||||
data = re.sub('https://translate\.googleusercontent\.com/.*?u=(.*?)&usg=[A-Za-z0-9_-]+', '\\1', data)
|
||||
data = re.sub('https?://[a-zA-Z0-9]+--' + domain.replace('.', '-') + '\.translate\.goog(/[a-zA-Z0-9#/-]+)', 'https://' + domain + '\\1', data)
|
||||
|
||||
return {'url': url.strip(), 'result': result, 'data': data.replace('&', '&')}
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user