Python unqoute()

Replace %xx escapes by their single-character equivalent.

Function

urllib.unquote( string )

Parameters

string - url to be decoded

Return value

Returns a url decoded string

Example

>>> import urllib 
>>> url = u'http://example.com/?param=url%20decode'
>>> urllib.unquote( url ).decode( 'utf8' ) 
>>> print urllib.unquote( url ).decode( 'utf8' )

Output

http://example.com/?param=url encode

Github

See also: