projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17ad2b3
)
[brightcove] Fix up some broken HTML (#1553)
author
Philipp Hagemeister
<phihag@phihag.de>
Fri, 4 Oct 2013 09:53:49 +0000
(11:53 +0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Fri, 4 Oct 2013 09:53:49 +0000
(11:53 +0200)
youtube_dl/extractor/brightcove.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/brightcove.py
b/youtube_dl/extractor/brightcove.py
index 558b3d0093975eff273d38a7a2bad9f1d4e36355..745212f2fe731bf305e56e8087089c65efabbd68 100644
(file)
--- a/
youtube_dl/extractor/brightcove.py
+++ b/
youtube_dl/extractor/brightcove.py
@@
-49,6
+49,11
@@
class BrightcoveIE(InfoExtractor):
Build a Brightcove url from a xml string containing
<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)
assert u'BrightcoveExperience' in object_doc.attrib['class']
params = {'flashID': object_doc.attrib['id'],