diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 415dc84c82..68b325fca3 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -1539,7 +1539,7 @@ def _extract_mpd_formats(self, mpd_url, video_id, mpd_id=None, note=None, errnot if res is False: return [] mpd, urlh = res - mpd_base_url = re.match(r'https?://.+/', urlh.geturl()).group() + mpd_base_url = re.match(r'https?://[^?#&]+/', urlh.geturl()).group() return self._parse_mpd_formats( compat_etree_fromstring(mpd.encode('utf-8')), mpd_id, mpd_base_url,