]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[extractor/common] Improve mpd base URL extraction (closes #10909, closes #11079)
authorSergey M․ <dstftw@gmail.com>
Mon, 31 Oct 2016 18:15:46 +0000 (01:15 +0700)
committerSergey M․ <dstftw@gmail.com>
Mon, 31 Oct 2016 18:15:46 +0000 (01:15 +0700)
youtube_dl/extractor/common.py

index 415dc84c82d537fad9493faf38d5348143a7e521..68b325fca3971790c88d4be0f6b3f46a644f6c89 100644 (file)
@@ -1539,7 +1539,7 @@ class InfoExtractor(object):
         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,