]> jfr.im git - yt-dlp.git/commitdiff
[extractor] Update dash `manifest_url` after redirects (#3563)
authorElyse <redacted>
Wed, 27 Apr 2022 18:01:35 +0000 (13:01 -0500)
committerGitHub <redacted>
Wed, 27 Apr 2022 18:01:35 +0000 (11:01 -0700)
Closes #2696
Authored by: elyse0

yt_dlp/extractor/common.py

index 3ee5e257c69206d0bf89c636061baf942782541f..c60474c7b6115d3fd804f5baacd0a3baf871ea7b 100644 (file)
@@ -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)