Created
May 24, 2016 12:21
-
-
Save parkjinwoo/9d1db0f5edf5114ef2648020384e874c to your computer and use it in GitHub Desktop.
urllib
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
# urlencode | |
python2 -c "import urllib, sys; print urllib.quote(sys.stdin.read())" | |
python3 -c "import sys; from urllib.parse import quote; print(quote(sys.stdin.read()))" | |
# urldecode | |
python2 -c "import urllib, sys; print urllib.unquote(sys.stdin.read())" | |
python3 -c "import sys; from urllib.parse import unquote; print(unquote(sys.stdin.read()))" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment