diff options
| author | Philipp Hagemeister <phihag@phihag.de> | 2014-11-21 00:17:58 +0100 | 
|---|---|---|
| committer | Philipp Hagemeister <phihag@phihag.de> | 2014-11-21 00:17:58 +0100 | 
| commit | a1c68b9ef2650099989c786499debf4923d4a626 (patch) | |
| tree | 608e530f5f3c37e380829f46698635f5bd6dc096 | |
| parent | 8569f3d629c1ec2e4b1d8472238aedb1d877d5f0 (diff) | |
| parent | 4d46c1c68ceae04de6195f6c7bf7b91bed06c162 (diff) | |
Merge remote-tracking branch 'origin/master'
| -rw-r--r-- | youtube_dl/extractor/brightcove.py | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py index a6920685e..2db7f9fef 100644 --- a/youtube_dl/extractor/brightcove.py +++ b/youtube_dl/extractor/brightcove.py @@ -111,6 +111,8 @@ class BrightcoveIE(InfoExtractor):                              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')) @@ -219,7 +221,7 @@ class BrightcoveIE(InfoExtractor):          webpage = self._download_webpage(req, video_id)          error_msg = self._html_search_regex( -            r"<h1>We're sorry.</h1>\s*<p>(.*?)</p>", webpage, +            r"<h1>We're sorry.</h1>([\s\n]*<p>.*?</p>)+", webpage,              'error message', default=None)          if error_msg is not None:              raise ExtractorError(  | 
