From: Sergey M․ Date: Wed, 3 Jun 2015 14:52:47 +0000 (+0600) Subject: [tvigle] Capture error message X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=15b74b94beb8720a4f6d7ee076c123dd8ae05309;p=youtube-dl.git [tvigle] Capture error message --- diff --git a/youtube_dl/extractor/tvigle.py b/youtube_dl/extractor/tvigle.py index a85693888..aa07c8251 100644 --- a/youtube_dl/extractor/tvigle.py +++ b/youtube_dl/extractor/tvigle.py @@ -5,6 +5,7 @@ import re from .common import InfoExtractor from ..utils import ( + ExtractorError, float_or_none, int_or_none, parse_age_limit, @@ -63,6 +64,13 @@ class TvigleIE(InfoExtractor): item = video_data['playlist']['items'][0] + videos = item.get('videos') + + error_message = item.get('errorMessage') + if not videos and error_message: + raise ExtractorError( + '%s returned error: %s' % (self.IE_NAME, error_message), expected=True) + title = item['title'] description = item.get('description') thumbnail = item.get('thumbnail')