aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/common.py
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2016-02-06 14:03:48 +0100
committerremitamine <remitamine@gmail.com>2016-02-06 14:03:48 +0100
commit91cb6b50652f1ff395b1c38834ce33e99fa1975c (patch)
tree057b10fc0f8bb17bb5df620b33ac374513ff3a20 /youtube_dl/extractor/common.py
parent0826a0b555a06e0cc9047a7779c0f55612c8f3a3 (diff)
rename _parse_mpd to _parse_mpd_formats and add default value for mpd namespace
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r--youtube_dl/extractor/common.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 5287fa4f6..271ba3739 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -1343,14 +1343,14 @@ class InfoExtractor(object):
mpd, urlh = res
mpd_base_url = re.match(r'https?://.+/', urlh.geturl()).group()
- return self._parse_mpd(
+ return self._parse_mpd_formats(
compat_etree_fromstring(mpd.encode('utf-8')), mpd_id, mpd_base_url, formats_dict=formats_dict)
- def _parse_mpd(self, mpd_doc, mpd_id=None, mpd_base_url='', formats_dict={}):
+ def _parse_mpd_formats(self, mpd_doc, mpd_id=None, mpd_base_url='', formats_dict={}):
if mpd_doc.get('type') == 'dynamic':
return []
- namespace = self._search_regex(r'(?i)^{([^}]+)?}MPD$', mpd_doc.tag, 'namespace')
+ namespace = self._search_regex(r'(?i)^{([^}]+)?}MPD$', mpd_doc.tag, 'namespace', default=None)
def _add_ns(path):
return self._xpath_ns(path, namespace)