[brightcove] Remove the namespace from the BrightcoveExperience html object
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Thu, 20 Nov 2014 17:37:08 +0000 (18:37 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Thu, 20 Nov 2014 17:37:08 +0000 (18:37 +0100)
youtube_dl/extractor/brightcove.py

index a6920685e1ff93aeaecb0e551215a8343a50e8b0..8d5acef14bd9556b25abceb7df4d4d32131f8624 100644 (file)
@@ -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'))