Skip to content

Instantly share code, notes, and snippets.

@elig0n
Last active February 20, 2019 00:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elig0n/cccbdbc4351f82ad59468eca1e5d9954 to your computer and use it in GitHub Desktop.
Save elig0n/cccbdbc4351f82ad59468eca1e5d9954 to your computer and use it in GitHub Desktop.
Python script to percent decode a file
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