From 3d623a60f1ee7abefe990e833c3f32edb877720d Mon Sep 17 00:00:00 2001 From: slipinthedove Date: Wed, 15 Jan 2025 19:06:59 -0300 Subject: [PATCH] opt for HLS as a fallback if DASH is not outputted --- yt_dlp/extractor/globo.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/globo.py b/yt_dlp/extractor/globo.py index bd129224a..b97e598bd 100644 --- a/yt_dlp/extractor/globo.py +++ b/yt_dlp/extractor/globo.py @@ -127,8 +127,13 @@ class GloboIE(InfoExtractor): main_source = video['sources'][0] - formats, subtitles = self._extract_mpd_formats_and_subtitles( - main_source['url'], video_id, 'mp4', fatal=False) + # 4k streams are exclusively outputted in dash, so we need to filter these out + if main_source['url'].endswith("mpd"): + formats, subtitles = self._extract_mpd_formats_and_subtitles( + main_source['url'], video_id, 'mp4', fatal=False) + else: + formats, subtitles = self._extract_m3u8_formats_and_subtitles( + main_source['url'], video_id, 'mp4', 'm3u8_native', m3u8_id='hls', fatal=False) self._merge_subtitles(traverse_obj(main_source, ('text', ..., { 'url': ('subtitle', 'srt', 'url', {str_or_none}), }, all, {subs_list_to_dict})), target=subtitles)