Last active
February 24, 2021 14:50
-
-
Save mtovmassian/cdebc5dc9607bde9514cab0cf8829b8e to your computer and use it in GitHub Desktop.
Url encoding/decoding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from urllib.parse import quote, unquote | |
# https://www.urlencoder.io/python/ | |
url = "https//hello.world.api.com/v1/print?value=hello world" | |
quoted = quote("https//hello.world.api.com/v1/print?value=hello world") | |
unquoted = unquote(quoted) | |
print(quoted) | |
print(unquoted) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment