Feed date scraper for Gemini (protocol)
Diffstat (limited to 'zachwalk.py')
-rwxr-xr-xzachwalk.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/zachwalk.py b/zachwalk.py
index 145c174..1588449 100755
--- a/zachwalk.py
+++ b/zachwalk.py
@@ -37,13 +37,16 @@ def gnd(fp):
if type(line) != str:
line=line.decode('UTF-8')
if line.strip()[0:2] == '=>':
+ desc =getdesc(line)
try:
- desc =getdesc(line)
- desc=desc.split(':')[0] #this should only have 1 'datey' part
- date = parse(desc,fuzzy=True).date()
- # todo: read lots of these and compare them
+ date = parse(desc[0:10],fuzzy=True).date()
return date
except:
+ try:
+ date = parse(desc,fuzzy=True).date()
+ return date
+ except:
+ pass
pass
return DEFAULT