aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornnoboa <90611593+nnoboa@users.noreply.github.com>2023-06-25 16:22:38 -0400
committerGitHub <noreply@github.com>2023-06-26 01:52:38 +0530
commit5e16cf92eb496b7c1541a6b1d727cb87542984db (patch)
treed351e6de2931de23fd0418926cc70883195560d5
parentf0a1ff118145b6449982ba401f9a9f656ecd8062 (diff)
downloadhypervideo-pre-5e16cf92eb496b7c1541a6b1d727cb87542984db.tar.lz
hypervideo-pre-5e16cf92eb496b7c1541a6b1d727cb87542984db.tar.xz
hypervideo-pre-5e16cf92eb496b7c1541a6b1d727cb87542984db.zip
[extractor/AdultSwim] Extract subtitles from m3u8 (#7421)
Authored by: nnoboa Closes #6191
-rw-r--r--yt_dlp/extractor/adultswim.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/yt_dlp/extractor/adultswim.py b/yt_dlp/extractor/adultswim.py
index bd29eb43e..daaeddeb6 100644
--- a/yt_dlp/extractor/adultswim.py
+++ b/yt_dlp/extractor/adultswim.py
@@ -170,8 +170,10 @@ class AdultSwimIE(TurnerBaseIE):
continue
ext = determine_ext(asset_url, mimetype2ext(asset.get('mime_type')))
if ext == 'm3u8':
- info['formats'].extend(self._extract_m3u8_formats(
- asset_url, video_id, 'mp4', m3u8_id='hls', fatal=False))
+ fmts, subs = self._extract_m3u8_formats_and_subtitles(
+ asset_url, video_id, 'mp4', m3u8_id='hls', fatal=False)
+ info['formats'].extend(fmts)
+ self._merge_subtitles(subs, target=info['subtitles'])
elif ext == 'f4m':
continue
# info['formats'].extend(self._extract_f4m_formats(