Last active
February 20, 2019 00:36
-
-
Save elig0n/cccbdbc4351f82ad59468eca1e5d9954 to your computer and use it in GitHub Desktop.
Python script to percent decode a file
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 sys | |
if (len(sys.argv) < 2): | |
print("Please specify filename") | |
sys.exit(1) | |
if (sys.version_info[0] == 3): | |
from urllib import parse as urllib | |
else: | |
import urllib | |
with open(sys.argv[1]) as f: | |
print(urllib.unquote_plus(f.read())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment