diff --git a/servers/streamingcommunityws.py b/servers/streamingcommunityws.py index 1a13eb82..8009a33e 100755 --- a/servers/streamingcommunityws.py +++ b/servers/streamingcommunityws.py @@ -27,7 +27,6 @@ def test_video_exists(page_url): def get_video_url(page_url, premium=False, user="", password="", video_password=""): urls = list() subs = list() - composed_subs = list() local_subs = 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) 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: - for lang, sub, res, url in info: + for lang, sub, band, res, url in info: if sub: if lang == 'auto': lang = 'ita-forced' subs.append([lang, sub]) elif not 'token=&' in url: - urls.append([res, url]) + urls.append([res if res else band, url]) if subs: local_subs = subs_downloader(subs)