python3 url 编码解码

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_35543858/article/details/86667252

编码

from urllib.parse import quote
text = quote(text, 'utf-8')

解码

from urllib.parse import unquote
text = unquote(text, 'utf-8')

猜你喜欢

转载自blog.csdn.net/qq_35543858/article/details/86667252