about summary refs log tree commit diff
path: root/zachwalk.py
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2021-02-17 15:30:34 -0500
committerZach DeCook <zachdecook@librem.one>2021-02-17 15:30:34 -0500
commit0589ac0ce6fb56b1fe6af58e26297d8a19e908de (patch)
treeba7a05f60dc6cb173832127f77f5e5d71cea8dfc /zachwalk.py
parenta9df2bb2bf34e920cb4d16ef2fbe60c4caa419da (diff)
downloadzachwalk-0589ac0ce6fb56b1fe6af58e26297d8a19e908de.tar.gz
link parsing: improve url parsing
Diffstat (limited to 'zachwalk.py')
-rwxr-xr-xzachwalk.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/zachwalk.py b/zachwalk.py
index 9df813c..0e5feb6 100755
--- a/zachwalk.py
+++ b/zachwalk.py
@@ -55,8 +55,7 @@ def replaceDateIfNewer(desc, newestdate):
 def main():
     for line in fileinput.input(): #stdin or file from argv
         if line[0:2] == '=>':
-          # plz don't use multiple spaces.
-          url = line.split(' ')[1]
+          url = line[2:].strip().split(' ')[0]
           if isAbsGeminiUrl(url):
             desc = getdesc(line)
             olddate = gnd(url)