From 5bb64b79fe4931750c8f0bd2b8202c2460b4e37c Mon Sep 17 00:00:00 2001 From: Nelson Elhage Date: Mon, 15 Feb 2010 15:30:33 -0500 Subject: [PATCH] scan-feeds: Support more timestamp formats --- scan-feeds.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.39.5