latest version
This commit is contained in:
Regular → Executable
+7
-9
@@ -3,18 +3,13 @@ import sys
|
||||
PY3 = False
|
||||
if sys.version_info[0] >= 3: PY3 = True
|
||||
|
||||
if PY3:
|
||||
import urllib.parse as urllib
|
||||
else:
|
||||
import urllib
|
||||
from six.moves import urllib
|
||||
|
||||
import ast
|
||||
import xbmc
|
||||
|
||||
from core import httptools, support, filetools
|
||||
from platformcode import logger, config
|
||||
if PY3: from concurrent import futures
|
||||
else: from concurrent_py2 import futures
|
||||
|
||||
vttsupport = False if int(xbmc.getInfoLabel('System.BuildVersion').split('.')[0]) < 20 else True
|
||||
|
||||
@@ -28,7 +23,7 @@ def test_video_exists(page_url):
|
||||
if not iframeParams or len(iframeParams) < 2:
|
||||
return 'StreamingCommunity', 'Prossimamente'
|
||||
|
||||
urlParams = urllib.parse_qs(urllib.urlsplit(server_url).query)
|
||||
urlParams = urllib.parse.parse_qs(urllib.parse.urlsplit(server_url).query)
|
||||
return True, ""
|
||||
|
||||
|
||||
@@ -36,13 +31,16 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
video_urls = list()
|
||||
|
||||
quality, params, url = iframeParams
|
||||
|
||||
split_url = urllib.parse.urlsplit(url)
|
||||
url_params = urllib.parse.parse_qsl(split_url.query)
|
||||
logger.debug(url_params)
|
||||
masterPlaylistParams = ast.literal_eval(params)
|
||||
if 'canPlayFHD' in urlParams:
|
||||
masterPlaylistParams['h'] = 1
|
||||
if 'b' in urlParams:
|
||||
masterPlaylistParams['b'] = 1
|
||||
url = '{}?{}'.format(url,urllib.urlencode(masterPlaylistParams))
|
||||
masterPlaylistParams.update(url_params)
|
||||
url = '{}://{}{}?{}'.format(split_url.scheme,split_url.netloc,split_url.path,urllib.parse.urlencode(masterPlaylistParams))
|
||||
|
||||
video_urls = [['hls [{}]'.format(quality), url]]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user