diff options
author | Felix S <felix.von.s@posteo.de> | 2022-05-21 12:00:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-21 05:00:32 -0700 |
commit | 92922fe7f96ac75bb5f9d87f0a9bef5f51383198 (patch) | |
tree | 030a7681bda51aa9baa7a6521d70050b60ce6c99 | |
parent | c487cf00101525ff836d59a2a42ef63e85ea9556 (diff) | |
download | hypervideo-pre-92922fe7f96ac75bb5f9d87f0a9bef5f51383198.tar.lz hypervideo-pre-92922fe7f96ac75bb5f9d87f0a9bef5f51383198.tar.xz hypervideo-pre-92922fe7f96ac75bb5f9d87f0a9bef5f51383198.zip |
[rumble] Extract subtitles (#3823)
Closes #3132
Authored by: fstirlitz
-rw-r--r-- | yt_dlp/extractor/rumble.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/yt_dlp/extractor/rumble.py b/yt_dlp/extractor/rumble.py index 50c383d79..83b688532 100644 --- a/yt_dlp/extractor/rumble.py +++ b/yt_dlp/extractor/rumble.py @@ -77,12 +77,20 @@ class RumbleEmbedIE(InfoExtractor): formats.append(f) self._sort_formats(formats) + subtitles = { + lang: [{ + 'url': sub_info['path'], + 'name': sub_info.get('language') or '', + }] for lang, sub_info in (video.get('cc') or {}).items() if sub_info.get('path') + } + author = video.get('author') or {} return { 'id': video_id, 'title': title, 'formats': formats, + 'subtitles': subtitles, 'thumbnail': video.get('i'), 'timestamp': parse_iso8601(video.get('pubDate')), 'channel': author.get('name'), |