diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-09-28 10:23:30 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-09-28 10:23:30 +0200 |
commit | ae6015124c0f536357ded182cb7e617c93e1e414 (patch) | |
tree | cd2479b75a9cb17114e97935eb8d4d95a0ec6130 /src | |
parent | remove debrug print (diff) | |
download | newspipe-ae6015124c0f536357ded182cb7e617c93e1e414.tar.gz newspipe-ae6015124c0f536357ded182cb7e617c93e1e414.tar.bz2 newspipe-ae6015124c0f536357ded182cb7e617c93e1e414.zip |
test
Diffstat (limited to 'src')
-rw-r--r-- | src/crawler/classic_crawler.py | 9 |
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 |