From 779da8e31b411d7bb088f246210eeb608adc314b Mon Sep 17 00:00:00 2001 From: Elyse Date: Wed, 27 Apr 2022 13:01:35 -0500 Subject: [PATCH] [extractor] Update dash `manifest_url` after redirects (#3563) Closes #2696 Authored by: elyse0 --- yt_dlp/extractor/common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index 3ee5e257c..c60474c7b 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -2676,7 +2676,10 @@ def _extract_mpd_formats_and_subtitles( mpd_doc, urlh = res if mpd_doc is None: return [], {} - mpd_base_url = base_url(urlh.geturl()) + + # We could have been redirected to a new url when we retrieved our mpd file. + mpd_url = urlh.geturl() + mpd_base_url = base_url(mpd_url) return self._parse_mpd_formats_and_subtitles( mpd_doc, mpd_id, mpd_base_url, mpd_url)