微慑信息网

URL编码URL解码

使用urllib模块,urllib.unquote/urllib.quote

#coding:utf-8
import urllib
url="https://fanyi.baidu.com/#zh/en/%E7%AC%94%E8%AE%B0"
res=urllib.unquote(url)
print res
url='https://fanyi.baidu.com/#zh/en/笔记'
res=urllib.quote(url)
print res

 

 

 

本文标题:URL编码URL解码
本文链接:
(转载请附上本文链接)
https://vulsee.com/archives/vulsee_2020/0828_12261.html
转载请附本站链接,未经允许不得转载,,谢谢:微慑信息网-VulSee.com » URL编码URL解码
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

微慑信息网 专注工匠精神

访问我们联系我们