How to decode a (doubly) 'url-encoded' string in python How to decode a (doubly) 'url-encoded' string in python python python

How to decode a (doubly) 'url-encoded' string in python


Your input is encoded double. Using Python 3:

urllib.parse.unquote(urllib.parse.unquote(some_string))

Output:

'FireShot3+(2).png'

now you have the + left.

Edit:

Using Python 2.7, it would need to be:

urllib.unquote(urllib.unquote('FireShot3%2B%25282%2529.png'))


urllib.unquote_plus(urllib.unquote_plus(some_string))FireShot3 (2).png