URL编码转中文/中文转URL编码


from urllib.parse import unquote, quote

url = "search&searchKey=%E9%AB%98%E5%B0%94%E5%A4%AB%E6%B1%BD%E8%BD%A6&area=searchxxnull"
print(unquote(url, encoding="utf-8"))

url1 = "search&searchKey=高尔夫汽车&area=searchxxnull"
print(quote(url1, encoding="utf-8"))

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM