From: Jaime Marquínez Ferrándiz Date: Fri, 27 Sep 2013 12:22:36 +0000 (+0200) Subject: [youtube] Set the thumbnail to None if it can't be extracted X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=f490e77e77c9db082e073f002088d021b16513ad;p=youtube-dl [youtube] Set the thumbnail to None if it can't be extracted --- diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 9aee2ebf2..618d87515 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1360,7 +1360,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor): video_thumbnail = m_thumb.group(1) elif 'thumbnail_url' not in video_info: self._downloader.report_warning(u'unable to extract video thumbnail') - video_thumbnail = '' + video_thumbnail = None else: # don't panic if we can't find it video_thumbnail = compat_urllib_parse.unquote_plus(video_info['thumbnail_url'][0])