youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 15b74b94beb8720a4f6d7ee076c123dd8ae05309
parent 687cb3ad35ac49f1053c1ea52e3b6db18b3aa1cf
Author: Sergey M․ <dstftw@gmail.com>
Date:   Wed,  3 Jun 2015 20:52:47 +0600

[tvigle] Capture error message

Diffstat:
Myoutube_dl/extractor/tvigle.py | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git 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')