使用urllib.request.quote
如:
print(urllib.request.quote("测试"))
%E6%B5%8B%E8%AF%95
本文介绍了如何使用Python的urllib.request.quote函数对指定字符串进行URL编码,并通过示例展示其应用。
使用urllib.request.quote
如:
print(urllib.request.quote("测试"))
%E6%B5%8B%E8%AF%95
4766
2724
2077

被折叠的 条评论
为什么被折叠?