公告
财富商城
积分规则
提问
发文
2019-01-19 11:50发布
Evening l夕情丶
Given this: It%27s%20me%21
It%27s%20me%21
Unencode it and turn it into regular text?
Use the unquote method from urllib.
>>> from urllib import unquote >>> unquote('It%27s%20me%21') "It's me!"
in python2
>>> import urlparse >>> urlparse.unquote('It%27s%20me%21') "It's me!"
In python3
>>> import urllib.parse >>> urllib.parse.unquote('It%27s%20me%21') "It's me!"
Take a look at urllib.unquote and urllib.unquote_plus. That will address your problem. Technically though url "encoding" is the process of passing arguments into a url with the & and ? characters (e.g. www.foo.com?x=11&y=12).
urllib.unquote
urllib.unquote_plus
www.foo.com?x=11&y=12
最多设置5个标签!
Use the unquote method from urllib.
in python2
In python3
Take a look at
urllib.unquote
andurllib.unquote_plus
. That will address your problem. Technically though url "encoding" is the process of passing arguments into a url with the & and ? characters (e.g.www.foo.com?x=11&y=12
).