diff options
author | Remita Amine <remitamine@gmail.com> | 2016-07-03 16:33:50 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2016-07-03 16:37:22 +0100 |
commit | dd801bbe18535c98172df929eedd3e8dd8100409 (patch) | |
tree | b093e875a58cb9014d588e732345b0de8084231b /youtube_dl | |
parent | 38cce791c71e9da33854e56114233d60345e18c0 (diff) |
[brightcove] improve error detection
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/brightcove.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py index ef560b592..b49b1977d 100644 --- a/youtube_dl/extractor/brightcove.py +++ b/youtube_dl/extractor/brightcove.py @@ -585,6 +585,13 @@ class BrightcoveNewIE(InfoExtractor): 'format_id': build_format_id('rtmp'), }) formats.append(f) + + errors = json_data.get('errors') + if not formats and errors: + error = errors[0] + raise ExtractorError( + error.get('message') or error.get('error_subcode') or error['error_code'], expected=True) + self._sort_formats(formats) subtitles = {} |