projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[brightcove] improve error detection
[youtube-dl]
/
youtube_dl
/
extractor
/
brightcove.py
diff --git
a/youtube_dl/extractor/brightcove.py
b/youtube_dl/extractor/brightcove.py
index ef560b592792910c2d39174eb2db129cea5590fe..b49b1977dba920bb6cdffb9904d2c5a6a44acd9c 100644
(file)
--- 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)
'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 = {}
self._sort_formats(formats)
subtitles = {}