diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-11-26 06:57:31 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-11-26 06:57:31 +0100 |
commit | d502a681d47b26cf2cc5955ea13d1900bb5d677b (patch) | |
tree | 67722f96a123a9eb6900945c3737038d537b50e8 | |
parent | fix import name (diff) | |
download | newspipe-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.py | 4 |
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 |