[Tutor] urllib unquote

Norman Khine norman at khine.net
Tue Feb 17 08:54:53 CET 2009


Thank you, but is it possible to get the original string from this?

Sander Sweers wrote:
> On Mon, Feb 16, 2009 at 14:12, Norman Khine <norman at khine.net> wrote:
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> import base64, urllib
>>>>> data = 'hL/FGNS40fjoTnp2zIqq73reK60%3D%0A'
>>>>> data = urllib.unquote(data)
>>>>> print base64.decodestring(data)
>> ???Ը???Nzv̊??z?+?
>> What am I missing?
> 
> Not an expert here but I think you can skip the last step...
> 
>>>> urllib.unquote('hL/FGNS40fjoTnp2zIqq73reK60%3D%0A')
> 'hL/FGNS40fjoTnp2zIqq73reK60=\n'
> 
> 
> Greets
> Sander
> 


More information about the Tutor mailing list