mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-16 06:15:46 +00:00
[RTV SLO 4D] Added support for subtitles
This commit is contained in:
parent
a302001725
commit
d81793ea56
1 changed files with 11 additions and 0 deletions
|
@ -84,4 +84,15 @@ class RTVSLO4DIE(InfoExtractor):
|
|||
'thumbnail': media_info.get('thumbnail_sec'),
|
||||
'timestamp': unified_timestamp(media_info.get('broadcastDate')),
|
||||
'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 a new issue