projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38cce79
)
[brightcove] improve error detection
author
Remita Amine
<remitamine@gmail.com>
Sun, 3 Jul 2016 15:33:50 +0000
(16:33 +0100)
committer
Remita Amine
<remitamine@gmail.com>
Sun, 3 Jul 2016 15:37:22 +0000
(16:37 +0100)
youtube_dl/extractor/brightcove.py
patch
|
blob
|
history
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)
+
+ 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 = {}