diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2015-07-06 21:49:50 +0200 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2015-07-06 21:54:22 +0200 |
commit | c2f8aad7e3b849ebad7f5487b106bdd83256d140 (patch) | |
tree | 8348ecc3c27c2aec9c37d3d6ad8c178e3ed65a39 | |
parent | adding feed icons on feed pages (diff) | |
download | newspipe-c2f8aad7e3b849ebad7f5487b106bdd83256d140.tar.gz newspipe-c2f8aad7e3b849ebad7f5487b106bdd83256d140.tar.bz2 newspipe-c2f8aad7e3b849ebad7f5487b106bdd83256d140.zip |
important fix, the retrieved_date was always now, leading to unmatchable article (added again and again)
-rw-r--r-- | pyaggr3g470r/lib/article_utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pyaggr3g470r/lib/article_utils.py b/pyaggr3g470r/lib/article_utils.py index 79ac34f5..115b6058 100644 --- a/pyaggr3g470r/lib/article_utils.py +++ b/pyaggr3g470r/lib/article_utils.py @@ -38,7 +38,7 @@ def construct_article(entry, feed): if hasattr(feed, 'dump'): # this way can be a sqlalchemy obj or a dict feed = feed.dump() "Safe method to transorm a feedparser entry into an article" - now = datetime.now() + date = datetime.now() for date_key in ('published', 'updated'): if entry.get(date_key): @@ -72,5 +72,5 @@ def construct_article(entry, feed): 'title': entry.get('title', 'No title'), 'readed': False, 'like': False, 'content': content, - 'retrieved_date': now.isoformat(), - 'date': (date or now).isoformat()} + 'retrieved_date': date.isoformat(), + 'date': date.isoformat()} |