projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed6fb8b
)
[YoutubeDL] Sanitize single thumbnail URL
author
Sergey M․
<dstftw@gmail.com>
Thu, 7 Apr 2016 18:17:47 +0000
(
00:17
+0600)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 7 Apr 2016 18:17:47 +0000
(
00:17
+0600)
youtube_dl/YoutubeDL.py
patch
|
blob
|
history
diff --git
a/youtube_dl/YoutubeDL.py
b/youtube_dl/YoutubeDL.py
index d7aa951ff39fc54238c5759ee5a57f2c70d9de0d..cd0805303b7f56228bfce502300c938e66c73830 100755
(executable)
--- 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: