Posted 2016-09-18Updated 2016-09-18Pythona few seconds read (About 70 words)Python进行URL解码Python进行URL解码所用模块:urllib 所用函数:urllib.unquote() 1234import urllibrawurl = "%E8%A7%A3%E7%A0%81"url = urllib.unquote(rawurl)print url 输出: 1解码 与上述函数对应的是编码函数:urllib.quote() 12import urlliburllib.quote("解码") 输出: 1%E8%A7%A3%E7%A0%81