diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py index eb102244a..7aa8a7654 100644 --- a/youtube_dl/extractor/brightcove.py +++ b/youtube_dl/extractor/brightcove.py @@ -206,6 +206,13 @@ def _get_video_info(self, video_id, query_str, query, referer=None): req.add_header('Referer', referer) webpage = self._download_webpage(req, video_id) + error_msg = self._html_search_regex( + r"

We're sorry.

\s*

(.*?)

", webpage, + 'error message', default=None) + if error_msg is not None: + raise ExtractorError( + 'brightcove said: %s' % error_msg, expected=True) + self.report_extraction(video_id) info = self._search_regex(r'var experienceJSON = ({.*});', webpage, 'json') info = json.loads(info)['data']