Fix Risoluzioni SCWS
This commit is contained in:
@@ -27,7 +27,6 @@ def test_video_exists(page_url):
|
|||||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||||
urls = list()
|
urls = list()
|
||||||
subs = list()
|
subs = list()
|
||||||
composed_subs = list()
|
|
||||||
local_subs = list()
|
local_subs = list()
|
||||||
video_urls = list()
|
video_urls = list()
|
||||||
|
|
||||||
@@ -35,15 +34,15 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
masterPlaylistParams = ast.literal_eval(iframeParams)
|
masterPlaylistParams = ast.literal_eval(iframeParams)
|
||||||
url = 'https://scws.work/v2/playlist/{}?{}&n=1'.format(scws_id, urllib.parse.urlencode(masterPlaylistParams))
|
url = 'https://scws.work/v2/playlist/{}?{}&n=1'.format(scws_id, urllib.parse.urlencode(masterPlaylistParams))
|
||||||
|
|
||||||
info = support.match(url, patron=r'LANGUAGE="([^"]+)",\s*URI="([^"]+)|(?:RESOLUTION=\d+x|BANDWIDTH=)?(\d+).*?(http[^"\s]+)').matches
|
info = support.match(url, patron=r'LANGUAGE="([^"]+)",\s*URI="([^"]+)|BANDWIDTH=(\d+).+?(?:RESOLUTION=\d+x(\d+))?[^ ]+ (http[^"\s]+)').matches
|
||||||
|
|
||||||
if info:
|
if info:
|
||||||
for lang, sub, res, url in info:
|
for lang, sub, band, res, url in info:
|
||||||
if sub:
|
if sub:
|
||||||
if lang == 'auto': lang = 'ita-forced'
|
if lang == 'auto': lang = 'ita-forced'
|
||||||
subs.append([lang, sub])
|
subs.append([lang, sub])
|
||||||
elif not 'token=&' in url:
|
elif not 'token=&' in url:
|
||||||
urls.append([res, url])
|
urls.append([res if res else band, url])
|
||||||
|
|
||||||
if subs:
|
if subs:
|
||||||
local_subs = subs_downloader(subs)
|
local_subs = subs_downloader(subs)
|
||||||
|
|||||||
Reference in New Issue
Block a user