aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2015-11-26 06:57:31 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2015-11-26 06:57:31 +0100
commitd502a681d47b26cf2cc5955ea13d1900bb5d677b (patch)
tree67722f96a123a9eb6900945c3737038d537b50e8
parentfix import name (diff)
downloadnewspipe-d502a681d47b26cf2cc5955ea13d1900bb5d677b.tar.gz
newspipe-d502a681d47b26cf2cc5955ea13d1900bb5d677b.tar.bz2
newspipe-d502a681d47b26cf2cc5955ea13d1900bb5d677b.zip
Bug fix in the crawler when logging the creation of articles.
-rw-r--r--web/crawler.py4
1 files 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
bgstack15