diff options
author | remitamine <remitamine@gmail.com> | 2015-09-26 17:37:30 +0100 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-09-27 01:08:26 +0600 |
commit | 22becac4bd4338108b7949607fb7dccd6d173abf (patch) | |
tree | a8e46b8aa5518b35cef1f9cc388a1e93236167ac /youtube_dl/extractor/eagleplatform.py | |
parent | 9d632b1b279ca9bc5b73011b942c7fb452370788 (diff) |
[eagleplatform] return the code to handle errors in all _download_json requests
Diffstat (limited to 'youtube_dl/extractor/eagleplatform.py')
-rw-r--r-- | youtube_dl/extractor/eagleplatform.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/youtube_dl/extractor/eagleplatform.py b/youtube_dl/extractor/eagleplatform.py index 2987d5272..75cf73b25 100644 --- a/youtube_dl/extractor/eagleplatform.py +++ b/youtube_dl/extractor/eagleplatform.py @@ -53,10 +53,13 @@ class EaglePlatformIE(InfoExtractor): if status != 200: raise ExtractorError(' '.join(response['errors']), expected=True) - def _get_video_url(self, url_or_request, video_id, note='Downloading JSON metadata'): - response = self._download_json(url_or_request, video_id, note) + def _download_json(self, url_or_request, video_id, note='Downloading JSON metadata'): + response = super(EaglePlatformIE, self)._download_json(url_or_request, video_id, note) self._handle_error(response) - return response['data'][0] + return response + + def _get_video_url(self, url_or_request, video_id, note='Downloading JSON metadata'): + return self._download_json(url_or_request, video_id, note)['data'][0] def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) |