From: Nelson Elhage Date: Mon, 15 Feb 2010 20:30:33 +0000 (-0500) Subject: scan-feeds: Support more timestamp formats X-Git-Url: https://projects.mako.cc/source/iron-blogger/commitdiff_plain/5bb64b79fe4931750c8f0bd2b8202c2460b4e37c scan-feeds: Support more timestamp formats --- diff --git a/scan-feeds.py b/scan-feeds.py index 7e27b8c..bf60aef 100755 --- a/scan-feeds.py +++ b/scan-feeds.py @@ -21,9 +21,9 @@ def parse_published(pub): 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