aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/lib
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-07-06 21:49:50 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-07-06 21:54:22 +0200
commitc2f8aad7e3b849ebad7f5487b106bdd83256d140 (patch)
tree8348ecc3c27c2aec9c37d3d6ad8c178e3ed65a39 /pyaggr3g470r/lib
parentadding feed icons on feed pages (diff)
downloadnewspipe-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)
Diffstat (limited to 'pyaggr3g470r/lib')
-rw-r--r--pyaggr3g470r/lib/article_utils.py6
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()}
bgstack15