diff options
author | Felix S <felix.von.s@posteo.de> | 2021-04-15 10:15:43 +0200 |
---|---|---|
committer | Felix S <felix.von.s@posteo.de> | 2021-04-28 17:21:55 +0530 |
commit | c26326c1bebaf7c784d470b6a9502bac4dc37e96 (patch) | |
tree | 6b02656b9e5a8eb49ec730345d0d22a11b95f20d | |
parent | 66a1b8643ad3ef492dfd55692dce6be66397e2b4 (diff) | |
download | hypervideo-pre-c26326c1bebaf7c784d470b6a9502bac4dc37e96.tar.lz hypervideo-pre-c26326c1bebaf7c784d470b6a9502bac4dc37e96.tar.xz hypervideo-pre-c26326c1bebaf7c784d470b6a9502bac4dc37e96.zip |
[generic] Extract subtitles from direct HLS manifest links
-rw-r--r-- | yt_dlp/extractor/generic.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yt_dlp/extractor/generic.py b/yt_dlp/extractor/generic.py index 4250d1093..e41ea1260 100644 --- a/yt_dlp/extractor/generic.py +++ b/yt_dlp/extractor/generic.py @@ -2444,8 +2444,9 @@ class GenericIE(InfoExtractor): m = re.match(r'^(?P<type>audio|video|application(?=/(?:ogg$|(?:vnd\.apple\.|x-)?mpegurl)))/(?P<format_id>[^;\s]+)', content_type) if m: format_id = compat_str(m.group('format_id')) + subtitles = {} if format_id.endswith('mpegurl'): - formats = self._extract_m3u8_formats(url, video_id, 'mp4') + formats, subtitles = self._extract_m3u8_formats_and_subtitles(url, video_id, 'mp4') elif format_id == 'f4m': formats = self._extract_f4m_formats(url, video_id) else: @@ -2457,6 +2458,7 @@ class GenericIE(InfoExtractor): info_dict['direct'] = True self._sort_formats(formats) info_dict['formats'] = formats + info_dict['subtitles'] = subtitles return info_dict if not self._downloader.params.get('test', False) and not is_intentional: |