aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-07-16 20:48:09 +0700
committerSergey M․ <dstftw@gmail.com>2017-07-16 20:50:32 +0700
commit83d00044c1c9aef487f1c30bb50246e9ad039636 (patch)
tree33d85aa569bbd2d3684690d55ce04c00ab016ce2 /youtube_dl
parent7abed4e06c8935026873a9c01821d5a5b2d80d4f (diff)
[adn] Improve error reporting (#13663)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/adn.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/extractor/adn.py b/youtube_dl/extractor/adn.py
index 39f80b23f..cffdab6ca 100644
--- a/youtube_dl/extractor/adn.py
+++ b/youtube_dl/extractor/adn.py
@@ -107,11 +107,13 @@ class ADNIE(InfoExtractor):
metas = options.get('metas') or {}
title = metas.get('title') or video_info['title']
links = player_config.get('links') or {}
+ error = None
if not links:
links_url = player_config['linksurl']
links_data = self._download_json(urljoin(
self._BASE_URL, links_url), video_id)
links = links_data.get('links') or {}
+ error = links_data.get('error')
formats = []
for format_id, qualities in links.items():
@@ -130,7 +132,8 @@ class ADNIE(InfoExtractor):
for f in m3u8_formats:
f['language'] = 'fr'
formats.extend(m3u8_formats)
- error = options.get('error')
+ if not error:
+ error = options.get('error')
if not formats and error:
raise ExtractorError('%s said: %s' % (self.IE_NAME, error), expected=True)
self._sort_formats(formats)