aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-04-08 00:17:47 +0600
committerSergey M․ <dstftw@gmail.com>2016-04-08 00:17:47 +0600
commit536a55dabd7bcc2f34195beb84211028c934ed7a (patch)
tree91a8ff97660ae33497d173a16cb682fddf5a98eb /youtube_dl/YoutubeDL.py
parented6fb8b804448724fcd1ba4abc3fa028b817efe2 (diff)
[YoutubeDL] Sanitize single thumbnail URL
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-xyoutube_dl/YoutubeDL.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index d7aa951ff..cd0805303 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -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: