URL编码转换

转换url参数的编码

from urllib import parse


a1 = parse.quote("内容")  # 转为url编码.
print(a1)
a2 = parse.unquote(a1)  # 解码
print(a2)

猜你喜欢

转载自blog.csdn.net/One_of_them/article/details/82015094