urllib
对url中的中文编解码
解码 from urllib import parse str= "%e7%bd%91%e7%9b%98" data= parse.unquote(rawurl) print(data) >>> 网盘 编码 from urllib.request import quote name = '网盘' data = quote(name) print(data) >>>'%E7%BD%91%E7%9B%98'
来源:https://www.cnblogs.com/0916m/p/11484367.html