如何在Python中使用unencode? [英] How do I url unencode in Python?
本文介绍了如何在Python中使用unencode?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
GIven this:
It%27s%20me%21
GIven this: It%27s%20me%21
取消编码并将其变成常规文本
Unencode it and turn it into regular text?
推荐答案
看看 urllib.unquote
和 urllib.unquote_plus
。这将解决您的问题。技术上,虽然urlencoding是将参数传递到url中的过程,和?字符(例如 www.foo.com?x=11&y=12
)。
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
).
这篇关于如何在Python中使用unencode?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文