mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-22 16:44: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 []
|
||||
subtitles = {}
|
||||
for text_track in text_tracks:
|
||||
data = {'url': text_track['src']}
|
||||
if text_track['language'] in subtitles:
|
||||
subtitles[text_track['language']].append(data)
|
||||
url_element = {'url': text_track['src']}
|
||||
language = text_track.get('language')
|
||||
if language in subtitles:
|
||||
subtitles[language].append(url_element)
|
||||
else:
|
||||
subtitles[text_track['language']] = [data]
|
||||
subtitles[language] = [url_element]
|
||||
return subtitles
|
||||
|
Loading…
Reference in New Issue
Block a user