aboutsummaryrefslogtreecommitdiff
path: root/src/crawler/classic_crawler.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-09-28 15:33:37 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-09-28 15:33:37 +0200
commit66f5b484a08ae032a852b7996e7243f9fbfef76a (patch)
treea57664a1a32b8136300ef86cf2acfa84f179edbe /src/crawler/classic_crawler.py
parentmore tests (diff)
downloadnewspipe-66f5b484a08ae032a852b7996e7243f9fbfef76a.tar.gz
newspipe-66f5b484a08ae032a852b7996e7243f9fbfef76a.tar.bz2
newspipe-66f5b484a08ae032a852b7996e7243f9fbfef76a.zip
fix
Diffstat (limited to 'src/crawler/classic_crawler.py')
-rw-r--r--src/crawler/classic_crawler.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/crawler/classic_crawler.py b/src/crawler/classic_crawler.py
index 1105ed87..c3cfb6a3 100644
--- a/src/crawler/classic_crawler.py
+++ b/src/crawler/classic_crawler.py
@@ -138,11 +138,13 @@ async def insert_database(user, feed):
try:
new_updated_date = dateutil.parser.parse(article['updated'])
except Exception as e:
- print(e)#new_updated_date = existing_article.date
+ new_updated_date = existing_article.date
+ print(e)
if None is existing_article.updated_date:
existing_article.updated_date = new_updated_date.replace(tzinfo=None)
if existing_article.updated_date.strftime('%Y-%m-%dT%H:%M:%S') != \
new_updated_date.strftime('%Y-%m-%dT%H:%M:%S'):
+ logger.info('article updated')
existing_article.updated_date = \
new_updated_date.replace(tzinfo=None)
if existing_article.title != article['title']:
bgstack15