From ae6015124c0f536357ded182cb7e617c93e1e414 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Wed, 28 Sep 2016 10:23:30 +0200 Subject: test --- src/crawler/classic_crawler.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/crawler/classic_crawler.py b/src/crawler/classic_crawler.py index cd395d0f..dc367440 100644 --- a/src/crawler/classic_crawler.py +++ b/src/crawler/classic_crawler.py @@ -118,8 +118,13 @@ async def insert_database(user, feed): new_articles = [] art_contr = ArticleController(user.id) for article in articles: - existing_article_req = art_contr.read(feed_id=feed.id, - **extract_id(article)) + try: + existing_article_req = art_contr.read(feed_id=feed.id, + **extract_id(article)) + except Exception as e: + print("existing_article_req: " + e) + continue + exist = existing_article_req.count() != 0 if exist: # if the article has been already retrieved, we only update -- cgit