From f76fb5d9a16e8d066a5b466835600313053c4510 Mon Sep 17 00:00:00 2001 From: InvalidUsernameException Date: Tue, 27 May 2025 18:29:23 +0200 Subject: [PATCH] Remove dead-code branch for DASH formats These are not provided by the site. Plus, without an example to test against, it is unclear how these formats need to be treated to be sorted correctly. --- yt_dlp/extractor/zdf.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/yt_dlp/extractor/zdf.py b/yt_dlp/extractor/zdf.py index e9b5cd80a3..07e6072483 100644 --- a/yt_dlp/extractor/zdf.py +++ b/yt_dlp/extractor/zdf.py @@ -118,10 +118,7 @@ class ZDFBaseIE(InfoExtractor): if ext == 'm3u8': fmts = self._extract_m3u8_formats( format_url, video_id, 'mp4', m3u8_id='hls', fatal=False) - elif ext == 'mpd': - fmts = self._extract_mpd_formats( - format_url, video_id, mpd_id='dash', fatal=False) - else: + elif ext in ('mp4', 'webm'): height = int_or_none(quality.get('highestVerticalResolution')) width = round(aspect_ratio * height) if aspect_ratio and height else None fmts = [{ @@ -132,6 +129,10 @@ class ZDFBaseIE(InfoExtractor): 'format_id': join_nonempty('http', stream.get('type')), 'tbr': int_or_none(self._search_regex(r'_(\d+)k_', format_url, 'tbr', default=None)), }] + else: + self.write_debug(f'Unsupported extension {ext} ({format_url}).') + fmts = [] + f_class = variant.get('class') for f in fmts: formats.append({