mirror of
https://github.com/l1ving/youtube-dl
synced 2024-11-22 01:42:59 +08:00
[brightcove] Fix up some broken HTML (#1553)
This commit is contained in:
parent
17ad2b3fb1
commit
46e28a84ca
@ -49,6 +49,11 @@ class BrightcoveIE(InfoExtractor):
|
|||||||
Build a Brightcove url from a xml string containing
|
Build a Brightcove url from a xml string containing
|
||||||
<object class="BrightcoveExperience">{params}</object>
|
<object class="BrightcoveExperience">{params}</object>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# Fix up some stupid HTML, see https://github.com/rg3/youtube-dl/issues/1553
|
||||||
|
object_str = re.sub(r'(<param name="[^"]+" value="[^"]+")>',
|
||||||
|
lambda m: m.group(1) + '/>', object_str)
|
||||||
|
|
||||||
object_doc = xml.etree.ElementTree.fromstring(object_str)
|
object_doc = xml.etree.ElementTree.fromstring(object_str)
|
||||||
assert u'BrightcoveExperience' in object_doc.attrib['class']
|
assert u'BrightcoveExperience' in object_doc.attrib['class']
|
||||||
params = {'flashID': object_doc.attrib['id'],
|
params = {'flashID': object_doc.attrib['id'],
|
||||||
|
Loading…
Reference in New Issue
Block a user