Hi I need to convert url to path, what i got is this url as bellow:
url = u'/static/media/uploads/gallery/Marrakech%2C%20Morocco_be3Ij2N.jpg'
and what to be looked something like this:
path = u'/static/media/uploads/gallery/Marrakech, Morocco_be3Ij2N.jpg'
thx.
Use
urllib.unquote
to decode%
-encoded string:Using
urllib.quote
orurllib.quote_plus
, you can get back: