urldecode和urlencode相互转换

import urllib,requests
a = "height%22%3A40%2C%22urldecode转中文"
b = urllib.parse.unquote(a)
print(b)
c = "中文转urlencode"
d = urllib.parse.quote(c)
print(d)

  

猜你喜欢

转载自www.cnblogs.com/qiaoer1993/p/11027007.html
今日推荐