aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views/feed.py
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-03-01 14:08:02 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-03-03 22:23:47 +0100
commita4fb151ea53d8054cc8e3fb309395c8fa0e23aaf (patch)
tree6ce8c39978c83d22d2508da67f00c90232819855 /pyaggr3g470r/views/feed.py
parentnew crawler with cache control and error handling (diff)
downloadnewspipe-a4fb151ea53d8054cc8e3fb309395c8fa0e23aaf.tar.gz
newspipe-a4fb151ea53d8054cc8e3fb309395c8fa0e23aaf.tar.bz2
newspipe-a4fb151ea53d8054cc8e3fb309395c8fa0e23aaf.zip
fixing/restoring logging level
Diffstat (limited to 'pyaggr3g470r/views/feed.py')
-rw-r--r--pyaggr3g470r/views/feed.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyaggr3g470r/views/feed.py b/pyaggr3g470r/views/feed.py
index fa9dc23d..2af502a7 100644
--- a/pyaggr3g470r/views/feed.py
+++ b/pyaggr3g470r/views/feed.py
@@ -28,15 +28,15 @@ def feed(feed_id=None):
top_words = utils.top_words(articles, n=50, size=int(word_size))
tag_cloud = utils.tag_cloud(top_words)
- today = datetime.datetime.now()
+ today = datetime.now()
try:
last_article = articles[0].date
first_article = articles[-1].date
delta = last_article - first_article
average = round(float(len(articles)) / abs(delta.days), 2)
except:
- last_article = datetime.datetime.fromtimestamp(0)
- first_article = datetime.datetime.fromtimestamp(0)
+ last_article = datetime.fromtimestamp(0)
+ first_article = datetime.fromtimestamp(0)
delta = last_article - first_article
average = 0
elapsed = today - last_article
bgstack15