Created
May 6, 2019 12:26
-
-
Save logicjwell/5712ecafaa40f8d3d2697cd387cc000f to your computer and use it in GitHub Desktop.
[python3中urlencode和urldecode] #python3 #url #urlencode #urldecode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
在Python3中,将中文进行urlencode编码使用函数 | |
urllib.parse.quote(string, safe='/', encoding=None, errors=None) | |
而将编码后的字符串urldecode转为中文,则使用 | |
urllib.parse.unquote(string, encoding='utf-8', errors='replace') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment