aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/crawler/classic_crawler.py9
1 files changed, 7 insertions, 2 deletions
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
bgstack15