From aaa2e530b71b4accc3a9cd679294d3c2cb888ce9 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 20 Nov 2012 07:42:08 +0100 Subject: Updated the feedgetter accordingly issues 310 and 328 of feedparser: "To avoid breaking existing software while fixing issue 310, a temporary mapping has been created from `updated_parsed` to `published_parsed` if `updated_parsed` doesn't exist. This fallback will be removed in a future version of feedparser". --- source/feedgetter.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/feedgetter.py b/source/feedgetter.py index f28308a7..302415f6 100755 --- a/source/feedgetter.py +++ b/source/feedgetter.py @@ -127,11 +127,10 @@ class FeedGetter(object): description = "" description = str(BeautifulSoup(description)) article_title = str(BeautifulSoup(article.title)) - try: - post_date = datetime(*article.updated_parsed[:6]) - except: post_date = datetime(*article.published_parsed[:6]) + except: + post_date = datetime(*article.updated_parsed[:6]) sha1_hash = hashlib.sha1() sha1_hash.update(article.link.encode('utf-8')) -- cgit