diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2015-03-01 14:08:02 +0100 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2015-03-03 22:23:47 +0100 |
commit | a4fb151ea53d8054cc8e3fb309395c8fa0e23aaf (patch) | |
tree | 6ce8c39978c83d22d2508da67f00c90232819855 /pyaggr3g470r/views/feed.py | |
parent | new crawler with cache control and error handling (diff) | |
download | newspipe-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.py | 6 |
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 |