1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-25 18:27:42 +00:00

[YoutubeDL] Sanitize single thumbnail URL

This commit is contained in:
Sergey M․ 2016-04-08 00:17:47 +06:00
parent ed6fb8b804
commit 536a55dabd

View file

@ -1240,7 +1240,10 @@ class YoutubeDL(object):
self.list_thumbnails(info_dict)
return
if thumbnails and 'thumbnail' not in info_dict:
thumbnail = info_dict.get('thumbnail')
if thumbnail:
info_dict['thumbnail'] = sanitize_url(thumbnail)
elif thumbnails:
info_dict['thumbnail'] = thumbnails[-1]['url']
if 'display_id' not in info_dict and 'id' in info_dict: