python2 url 带中文并写入中文路径

url带中文,后台须要使用urllib中的unquote,示例ide

file = “/%s"%(unquote(suffix_name))

写以file为名称的文件是,须要encode一下,示例url

with open(file.encode('utf8'), 'wb') as f:
相关文章
相关标签/搜索