Fix downloader with Unicode path // Resolve #771

This commit is contained in:
Ivan Kravets
2016-09-12 19:54:28 +03:00
parent 96f7c7c0b0
commit 35cbbeb457
2 changed files with 2 additions and 1 deletions

View File

@ -41,6 +41,7 @@ class FileDownloader(object):
if disposition and "filename=" in disposition:
self._fname = disposition[disposition.index("filename=") +
9:].replace('"', "").replace("'", "")
self._fname = self._fname.encode("utf8")
else:
self._fname = url.split("/")[-1]