aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
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