Browse Source

[brightcove] Fix up some broken HTML (#1553)

rtmp_test
Philipp Hagemeister 11 years ago
parent
commit
46e28a84ca
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      youtube_dl/extractor/brightcove.py

+ 5
- 0
youtube_dl/extractor/brightcove.py View File

@ -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'],


Loading…
Cancel
Save