mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-30 07:38:18 +01:00
[RTV SLO 4D] Added support for subtitles
This commit is contained in:
parent
a302001725
commit
d81793ea56
|
@ -84,4 +84,15 @@ class RTVSLO4DIE(InfoExtractor):
|
||||||
'thumbnail': media_info.get('thumbnail_sec'),
|
'thumbnail': media_info.get('thumbnail_sec'),
|
||||||
'timestamp': unified_timestamp(media_info.get('broadcastDate')),
|
'timestamp': unified_timestamp(media_info.get('broadcastDate')),
|
||||||
'duration': media_info.get('duration'),
|
'duration': media_info.get('duration'),
|
||||||
|
'subtitles': self.extract_subtitles(media_info)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def _get_subtitles(self, media_info):
|
||||||
|
subs = {}
|
||||||
|
for sub in media_info.get('subtitles', []):
|
||||||
|
subs[sub['language']] = [{
|
||||||
|
'ext': 'vtt',
|
||||||
|
'url': sub['file']
|
||||||
|
}]
|
||||||
|
|
||||||
|
return subs
|
||||||
|
|
Loading…
Reference in New Issue
Block a user