Created
July 17, 2023 17:01
-
-
Save spawnmarvel/15d124a63030c5743c50895926d1e221 to your computer and use it in GitHub Desktop.
Url encode in Python
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
import urllib.parse | |
# abcde/fghi+jklmn=opq | |
# abcde%2Ffghi%2Bjklmn%3Dopq | |
inp = "abcde/fghi+jklmn=opq" | |
print(inp) | |
rv = urllib.parse.quote(inp, safe='') | |
print(rv) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment