]> projects.mako.cc - iron-blogger/blobdiff - scan-feeds.py
Some people paid me.
[iron-blogger] / scan-feeds.py
index 7e27b8c2a5c8e0e9012b744a19f2950747e7e9ff..bf60aefbaeec5a3b4e6b02bda4bffe89ce2f99cc 100755 (executable)
@@ -21,9 +21,9 @@ def parse_published(pub):
     return parse(pub).astimezone(tz.tzlocal()).replace(tzinfo=None)
 
 def get_date(post):
     return parse(pub).astimezone(tz.tzlocal()).replace(tzinfo=None)
 
 def get_date(post):
-    if 'published' in post:
-        return post.published
-    return post.updated
+    for k in ('published', 'created', 'updated'):
+        if k in post:
+            return post[k]
 
 def get_link(post):
     return post.link
 
 def get_link(post):
     return post.link

Benjamin Mako Hill || Want to submit a patch?