Python urlencode和urldecode

原文链接:https://blog.csdn.net/qq_39377696/article/details/80454950 

在Python3中,将中文进行urlencode编码使用函数

urllib.parse.quote(string, safe='/', encoding=None, errors=None)

而将编码后的字符串转为中文,则使用

urllib.parse.unquote(string, encoding='utf-8', errors='replace') 

 

猜你喜欢

转载自blog.csdn.net/y_f_raquelle/article/details/84137212
今日推荐