mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-27 21:59:17 +01:00
[YoutubeDL] Sanitize single thumbnail URL
This commit is contained in:
parent
ed6fb8b804
commit
536a55dabd
1 changed files with 4 additions and 1 deletions
|
@ -1240,7 +1240,10 @@ class YoutubeDL(object):
|
||||||
self.list_thumbnails(info_dict)
|
self.list_thumbnails(info_dict)
|
||||||
return
|
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']
|
info_dict['thumbnail'] = thumbnails[-1]['url']
|
||||||
|
|
||||||
if 'display_id' not in info_dict and 'id' in info_dict:
|
if 'display_id' not in info_dict and 'id' in info_dict:
|
||||||
|
|
Loading…
Reference in a new issue