aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2012-03-03 18:46:28 +0100
committercedricbonhomme <devnull@localhost>2012-03-03 18:46:28 +0100
commiteb439384ebfe13bc95d1065fb8fb507453533efd (patch)
treef74b22a63a0e38804a89d016688868dd03441adf /utils.py
parentfeedgetter.py now uses MongoDB database? (diff)
downloadnewspipe-eb439384ebfe13bc95d1065fb8fb507453533efd.tar.gz
newspipe-eb439384ebfe13bc95d1065fb8fb507453533efd.tar.bz2
newspipe-eb439384ebfe13bc95d1065fb8fb507453533efd.zip
Main page almost working.
Diffstat (limited to 'utils.py')
-rwxr-xr-xutils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils.py b/utils.py
index 0f5453c3..e44239e4 100755
--- a/utils.py
+++ b/utils.py
@@ -171,9 +171,9 @@ def top_words(feeds, n=10, size=5):
"""
words = Counter()
wordre = re.compile(r'\b\w{%s,}\b' % size, re.I)
- for feed in feeds.values():
- for article in feed.articles.values():
- for word in wordre.findall(clear_string(article.article_description)):
+ for feed in feeds:
+ for article in feed:
+ for word in wordre.findall(clear_string(article["article_content"])):
words[word.lower()] += 1
return words.most_common(n)
bgstack15