[youtube] Set the thumbnail to None if it can't be extracted
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 27 Sep 2013 12:22:36 +0000 (14:22 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 27 Sep 2013 12:22:36 +0000 (14:22 +0200)
youtube_dl/extractor/youtube.py

index 9aee2ebf2dec85ffbb6aad568f02b7b227da0476..618d87515167321f702a490cceb988d31b8aaa8e 100644 (file)
@@ -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])