mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-02 11:26:41 +00:00
[ellentube] Extract subtitles from manifest
Fixes https://github.com/ytdl-org/youtube-dl/issues/30761
This commit is contained in:
parent
c2d2ee40eb
commit
ea5ca8e7fc
|
@ -26,7 +26,7 @@ def _extract_video(self, data, video_id):
|
||||||
duration = None
|
duration = None
|
||||||
for entry in data.get('media'):
|
for entry in data.get('media'):
|
||||||
if entry.get('id') == 'm3u8':
|
if entry.get('id') == 'm3u8':
|
||||||
formats = self._extract_m3u8_formats(
|
formats, subtitles = self._extract_m3u8_formats_and_subtitles(
|
||||||
entry['url'], video_id, 'mp4',
|
entry['url'], video_id, 'mp4',
|
||||||
entry_protocol='m3u8_native', m3u8_id='hls')
|
entry_protocol='m3u8_native', m3u8_id='hls')
|
||||||
duration = int_or_none(entry.get('duration'))
|
duration = int_or_none(entry.get('duration'))
|
||||||
|
@ -48,6 +48,7 @@ def get_insight(kind):
|
||||||
'view_count': get_insight('view'),
|
'view_count': get_insight('view'),
|
||||||
'like_count': get_insight('like'),
|
'like_count': get_insight('like'),
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
|
'subtitles': subtitles,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue