From 66f5b484a08ae032a852b7996e7243f9fbfef76a Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Wed, 28 Sep 2016 15:33:37 +0200 Subject: fix --- src/crawler/classic_crawler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/crawler/classic_crawler.py') diff --git a/src/crawler/classic_crawler.py b/src/crawler/classic_crawler.py index 1105ed87..c3cfb6a3 100644 --- a/src/crawler/classic_crawler.py +++ b/src/crawler/classic_crawler.py @@ -138,11 +138,13 @@ async def insert_database(user, feed): try: new_updated_date = dateutil.parser.parse(article['updated']) except Exception as e: - print(e)#new_updated_date = existing_article.date + new_updated_date = existing_article.date + print(e) if None is existing_article.updated_date: existing_article.updated_date = new_updated_date.replace(tzinfo=None) if existing_article.updated_date.strftime('%Y-%m-%dT%H:%M:%S') != \ new_updated_date.strftime('%Y-%m-%dT%H:%M:%S'): + logger.info('article updated') existing_article.updated_date = \ new_updated_date.replace(tzinfo=None) if existing_article.title != article['title']: -- cgit