From: Sergey M․ Date: Sun, 30 Aug 2015 20:01:13 +0000 (+0600) Subject: [YoutubeDL] Encode thumbnail filename (Closes #6714) X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=d3d89c325681b1f2d9dcc8d8dea3439aad570f1f;p=youtube-dl [YoutubeDL] Encode thumbnail filename (Closes #6714) --- 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))