diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-09-21 07:57:00 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-09-21 07:57:00 +0200 |
commit | 5ab832be1911d7c80d6fe1aaac916346643357c0 (patch) | |
tree | f7046b3fea0332b68c835d693fc6b4f296de10ed /src/web/views/user.py | |
parent | Added more comments. (diff) | |
download | newspipe-5ab832be1911d7c80d6fe1aaac916346643357c0.tar.gz newspipe-5ab832be1911d7c80d6fe1aaac916346643357c0.tar.bz2 newspipe-5ab832be1911d7c80d6fe1aaac916346643357c0.zip |
Add new stop words.
Diffstat (limited to 'src/web/views/user.py')
-rw-r--r-- | src/web/views/user.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/web/views/user.py b/src/web/views/user.py index 01e26325..c7c318e3 100644 --- a/src/web/views/user.py +++ b/src/web/views/user.py @@ -1,5 +1,6 @@ import string import random +from datetime import datetime, timedelta from flask import (Blueprint, g, render_template, redirect, flash, url_for, request) from flask_babel import gettext @@ -29,7 +30,9 @@ def profile_public(nickname=None): return redirect(url_for('home')) word_size = 6 - articles = ArticleController(user.id).read().all() + filters = {} + filters['retrieved_date__gt'] = datetime.now() - timedelta(weeks=24) + articles = ArticleController(user.id).read(**filters).all() top_words = misc_utils.top_words(articles, n=50, size=int(word_size)) tag_cloud = misc_utils.tag_cloud(top_words) |