0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-23 02:25:11 +00:00

[brightcove] Remove the namespace from the BrightcoveExperience html object

This commit is contained in:
Jaime Marquínez Ferrándiz 2014-11-20 18:37:08 +01:00
parent fed5d03260
commit d6f714f321

View file

@ -111,6 +111,8 @@ def _build_brighcove_url(cls, object_str):
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'))