mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-26 18:34:32 +01:00
Refactored vars to be easier to understand
This commit is contained in:
parent
460d7aef86
commit
157cf0bb37
@ -165,9 +165,10 @@ class FunimationIE(InfoExtractor):
|
|||||||
text_tracks = self._parse_json(text_tracks_json_string, display_id, js_to_json, fatal=False) or []
|
text_tracks = self._parse_json(text_tracks_json_string, display_id, js_to_json, fatal=False) or []
|
||||||
subtitles = {}
|
subtitles = {}
|
||||||
for text_track in text_tracks:
|
for text_track in text_tracks:
|
||||||
data = {'url': text_track['src']}
|
url_element = {'url': text_track['src']}
|
||||||
if text_track['language'] in subtitles:
|
language = text_track.get('language')
|
||||||
subtitles[text_track['language']].append(data)
|
if language in subtitles:
|
||||||
|
subtitles[language].append(url_element)
|
||||||
else:
|
else:
|
||||||
subtitles[text_track['language']] = [data]
|
subtitles[language] = [url_element]
|
||||||
return subtitles
|
return subtitles
|
||||||
|
Loading…
Reference in New Issue
Block a user