]> git.phdru.name Git - dotfiles.git/blobdiff - bin/decode-URLs.py
Refactor(bin/decode-URLs.py): Python3-only
[dotfiles.git] / bin / decode-URLs.py
index 4d581938b9139df977b8bc2b7e0cae0b7fb4ecf0..6b98bb3f01e8a84d167f19d47745fd6184cf8e02 100755 (executable)
@@ -1,12 +1,13 @@
-#! /usr/bin/env python
+#! /usr/bin/env 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)