mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-29 19:47:54 +01:00
[youtube] Set the thumbnail to None if it can't be extracted
This commit is contained in:
parent
2dc592991a
commit
f490e77e77
@ -1360,7 +1360,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
|
|||||||
video_thumbnail = m_thumb.group(1)
|
video_thumbnail = m_thumb.group(1)
|
||||||
elif 'thumbnail_url' not in video_info:
|
elif 'thumbnail_url' not in video_info:
|
||||||
self._downloader.report_warning(u'unable to extract video thumbnail')
|
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
|
else: # don't panic if we can't find it
|
||||||
video_thumbnail = compat_urllib_parse.unquote_plus(video_info['thumbnail_url'][0])
|
video_thumbnail = compat_urllib_parse.unquote_plus(video_info['thumbnail_url'][0])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user