|
|
|
@ -112,18 +112,19 @@ class URPlayIE(InfoExtractor):
|
|
|
|
|
lang = ISO639Utils.short2long(lang)
|
|
|
|
|
return lang or None
|
|
|
|
|
|
|
|
|
|
for k, v in (urplayer_data['streamingInfo'].get('sweComplete') or {}).items():
|
|
|
|
|
if (k in ('sd', 'hd') or not isinstance(v, dict)):
|
|
|
|
|
continue
|
|
|
|
|
lang, sttl_url = (v.get(kk) for kk in ('language', 'location', ))
|
|
|
|
|
if not sttl_url:
|
|
|
|
|
continue
|
|
|
|
|
lang = parse_lang_code(lang)
|
|
|
|
|
if not lang:
|
|
|
|
|
continue
|
|
|
|
|
sttl = subtitles.get(lang) or []
|
|
|
|
|
sttl.append({'ext': k, 'url': sttl_url, })
|
|
|
|
|
subtitles[lang] = sttl
|
|
|
|
|
for stream in urplayer_data['streamingInfo'].values():
|
|
|
|
|
for k, v in stream.items():
|
|
|
|
|
if (k in ('sd', 'hd') or not isinstance(v, dict)):
|
|
|
|
|
continue
|
|
|
|
|
lang, sttl_url = (v.get(kk) for kk in ('language', 'location', ))
|
|
|
|
|
if not sttl_url:
|
|
|
|
|
continue
|
|
|
|
|
lang = parse_lang_code(lang)
|
|
|
|
|
if not lang:
|
|
|
|
|
continue
|
|
|
|
|
sttl = subtitles.get(lang) or []
|
|
|
|
|
sttl.append({'ext': k, 'url': sttl_url, })
|
|
|
|
|
subtitles[lang] = sttl
|
|
|
|
|
|
|
|
|
|
image = urplayer_data.get('image') or {}
|
|
|
|
|
thumbnails = []
|
|
|
|
|