aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-08-31 02:01:13 +0600
committerSergey M․ <dstftw@gmail.com>2015-08-31 02:01:13 +0600
commitd3d89c325681b1f2d9dcc8d8dea3439aad570f1f (patch)
treef3addc9d6c95695a00c570223b8b920bfdc86fd4
parent8875b3d572ba37185fa632fa909bb6f9ecda8218 (diff)
downloadyoutube-dl-d3d89c325681b1f2d9dcc8d8dea3439aad570f1f.tar.xz
[YoutubeDL] Encode thumbnail filename (Closes #6714)
-rwxr-xr-xyoutube_dl/YoutubeDL.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index cad6b026e..982e658ce 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -2009,7 +2009,7 @@ class YoutubeDL(object):
(info_dict['extractor'], info_dict['id'], thumb_display_id))
try:
uf = self.urlopen(t['url'])
- with open(thumb_filename, 'wb') as thumbf:
+ with open(encodeFilename(thumb_filename), 'wb') as thumbf:
shutil.copyfileobj(uf, thumbf)
self.to_screen('[%s] %s: Writing thumbnail %sto: %s' %
(info_dict['extractor'], info_dict['id'], thumb_display_id, thumb_filename))