X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=blobdiff_plain;f=bin%2Fdecode-URLs.py;h=ef04664342a87b7a5d5dc1c65045aa3399aee77d;hp=4d581938b9139df977b8bc2b7e0cae0b7fb4ecf0;hb=HEAD;hpb=f0344023aa21ede3b47d77559af54b97c37f328b diff --git a/bin/decode-URLs.py b/bin/decode-URLs.py index 4d58193..1c164bd 100755 --- a/bin/decode-URLs.py +++ b/bin/decode-URLs.py @@ -1,12 +1,13 @@ -#! /usr/bin/env python +#! /home/phd/.local/bin/python3 -import sys, urllib +from urllib.parse import unquote +import sys while True: url = sys.stdin.readline() if not url: break - unqoted = urllib.unquote(url.strip()) + unqoted = unquote(url.strip()) if unqoted.startswith('file://'): unqoted = unqoted[len('file://'):] print(unqoted)