diff options
author | Remita Amine <remitamine@gmail.com> | 2019-05-15 10:38:33 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2019-05-15 10:39:59 +0100 |
commit | 583174284065a41a70220ecc8de0d31d3aea5070 (patch) | |
tree | 1fdf01a555b486337482e907604bb310528d6b43 /youtube_dl | |
parent | a277dd33ebc7b3a3d4a7cf603ccdbe2d9ec5d73b (diff) |
[vrv] extract captions(closes #19238)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/vrv.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/youtube_dl/extractor/vrv.py b/youtube_dl/extractor/vrv.py index 33530fe8a..b698bf66c 100644 --- a/youtube_dl/extractor/vrv.py +++ b/youtube_dl/extractor/vrv.py @@ -198,14 +198,15 @@ class VRVIE(VRVBaseIE): self._sort_formats(formats) subtitles = {} - for subtitle in streams_json.get('subtitles', {}).values(): - subtitle_url = subtitle.get('url') - if not subtitle_url: - continue - subtitles.setdefault(subtitle.get('locale', 'en-US'), []).append({ - 'url': subtitle_url, - 'ext': subtitle.get('format', 'ass'), - }) + for k in ('captions', 'subtitles'): + for subtitle in streams_json.get(k, {}).values(): + subtitle_url = subtitle.get('url') + if not subtitle_url: + continue + subtitles.setdefault(subtitle.get('locale', 'en-US'), []).append({ + 'url': subtitle_url, + 'ext': subtitle.get('format', 'ass'), + }) thumbnails = [] for thumbnail in video_data.get('images', {}).get('thumbnails', []): |