其他分享
首页 > 其他分享> > urlencode编/解码

urlencode编/解码

作者:互联网

from urllib.parse import urlencode, quote, unquote # urlencode方法参数是字典 body = { "content": "悠悠", "charsetSelect": "utf-8", "en": "UrlEncode编码" } print(urlencode(body))

 

body = { "content": "悠悠", "charsetSelect": "utf-8", "en": "UrlEncode编码" } r = requests.post(url, params=par, data=body) print(r.url) print(unquote(r.url))

标签:urlencode,body,en,url,解码,print,unquote
来源: https://www.cnblogs.com/yaohu/p/11593692.html