From 5086d4aed6aeb3908c62f49e2d8f74cc0cb05110 Mon Sep 17 00:00:00 2001 From: fireattack Date: Tue, 25 Mar 2025 06:24:09 +0800 Subject: [PATCH] [ie/generic] Fix MPD base URL parsing (#12718) Closes #12709 Authored by: fireattack --- yt_dlp/extractor/generic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/generic.py b/yt_dlp/extractor/generic.py index 67c224e502..c144069b3f 100644 --- a/yt_dlp/extractor/generic.py +++ b/yt_dlp/extractor/generic.py @@ -16,6 +16,7 @@ from ..utils import ( MEDIA_EXTENSIONS, ExtractorError, UnsupportedError, + base_url, determine_ext, determine_protocol, dict_get, @@ -2531,7 +2532,7 @@ class GenericIE(InfoExtractor): elif re.match(r'(?i)^(?:{[^}]+})?MPD$', doc.tag): info_dict['formats'], info_dict['subtitles'] = self._parse_mpd_formats_and_subtitles( doc, - mpd_base_url=full_response.url.rpartition('/')[0], + mpd_base_url=base_url(full_response.url), mpd_url=url) info_dict['live_status'] = 'is_live' if doc.get('type') == 'dynamic' else None self._extra_manifest_info(info_dict, url)