]> 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 70400abb29df900a8c3adc3bbd8475340cf25493..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
+   print(unqoted)