diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-10-04 11:53:49 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-10-04 11:53:49 +0200 |
commit | 46e28a84caae4820c7352232b048ecb3cbcd4012 (patch) | |
tree | ba66e3ce191aea17c0f5e1355433c0badca529e8 /youtube_dl/extractor/brightcove.py | |
parent | 17ad2b3fb192d8e13a39971c45248017cb279ab3 (diff) | |
download | youtube-dl-46e28a84caae4820c7352232b048ecb3cbcd4012.zip youtube-dl-46e28a84caae4820c7352232b048ecb3cbcd4012.tar.gz youtube-dl-46e28a84caae4820c7352232b048ecb3cbcd4012.tar.bz2 |
[brightcove] Fix up some broken HTML (#1553)
Diffstat (limited to 'youtube_dl/extractor/brightcove.py')
-rw-r--r-- | youtube_dl/extractor/brightcove.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py index 558b3d0..745212f 100644 --- 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'], |