aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <[email protected]>2014-11-20 18:37:08 +0100
committerJaime Marquínez Ferrándiz <[email protected]>2014-11-20 18:37:08 +0100
commitd6f714f321d41169d26ccd23bcc8f3987fa6baae (patch)
tree4155fbcf8f30995c2cd7a3b185629bc2e2000d3b
parentfed5d0326042900449443c2519327f8a6334d872 (diff)
downloadyoutube-dl-d6f714f321d41169d26ccd23bcc8f3987fa6baae.tar.gz
youtube-dl-d6f714f321d41169d26ccd23bcc8f3987fa6baae.zip
[brightcove] Remove the namespace from the BrightcoveExperience html object
-rw-r--r--youtube_dl/extractor/brightcove.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py
index a6920685e..8d5acef14 100644
--- a/youtube_dl/extractor/brightcove.py
+++ b/youtube_dl/extractor/brightcove.py
@@ -111,6 +111,8 @@ class BrightcoveIE(InfoExtractor):
lambda m: m.group(1) + '/>', object_str)
# Fix up some stupid XML, see https://github.com/rg3/youtube-dl/issues/1608
object_str = object_str.replace('<--', '<!--')
+ # remove namespace to simplify extraction
+ object_str = re.sub(r'(<object[^>]*)(xmlns=".*?")', r'\1', object_str)
object_str = fix_xml_ampersands(object_str)
object_doc = xml.etree.ElementTree.fromstring(object_str.encode('utf-8'))