From d502a681d47b26cf2cc5955ea13d1900bb5d677b Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Thu, 26 Nov 2015 06:57:31 +0100 Subject: Bug fix in the crawler when logging the creation of articles. --- web/crawler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/crawler.py b/web/crawler.py index 35f3023a..48d00a8b 100644 --- a/web/crawler.py +++ b/web/crawler.py @@ -121,13 +121,13 @@ def insert_database(user, feed): **extract_id(article)).count() != 0 if exist: logger.debug("Article %r (%r) already in the database.", - article.title, article.link) + article['title'], article['link']) continue article = construct_article(article, feed) try: new_articles.append(art_contr.create(**article)) logger.info("New article % (%r) added.", - article.title, article.link) + article['title'], article['link']) except Exception as e: logger.exception("Error when inserting article in database:") continue -- cgit