Skip to content

A feature-rich command-line audio/video downloader

Don't try to save the thumbnail if it's None

Jaime Marquínez Ferrándizd8269e1dfbe0
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index cc5f761577..c76f1118ee 100644
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -529,7 +529,7 @@ class YoutubeDL(object):
return
if self.params.get('writethumbnail', False):
- if 'thumbnail' in info_dict:
+ if info_dict.get('thumbnail') is not None:
thumb_format = determine_ext(info_dict['thumbnail'], u'jpg')
thumb_filename = filename.rpartition('.')[0] + u'.' + thumb_format
self.to_screen(u'[%s] %s: Downloading thumbnail ...' %