aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-02-13 00:13:56 +0600
committerSergey M․ <dstftw@gmail.com>2016-02-13 00:13:56 +0600
commitbb20526b64c1624639b18e1b582fbdee1bd5da64 (patch)
treece3da41a80abc72b482250952cb81e8c63eedc7d
parentbcbb1b08b24215731d3444297508a1bd6b7011ff (diff)
[extractor/common] Improve base url construction
-rw-r--r--youtube_dl/extractor/common.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 359bdd299..444d412d9 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -1435,7 +1435,9 @@ class InfoExtractor(object):
base_url = base_url_e.text + base_url
if re.match(r'^https?://', base_url):
break
- if not re.match(r'^https?://', base_url):
+ if mpd_base_url and not re.match(r'^https?://', base_url):
+ if not mpd_base_url.endswith('/') and not base_url.startswith('/'):
+ mpd_base_url += '/'
base_url = mpd_base_url + base_url
representation_id = representation_attrib.get('id')
lang = representation_attrib.get('lang')