diff options
author | cedricbonhomme <devnull@localhost> | 2012-03-03 18:46:28 +0100 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2012-03-03 18:46:28 +0100 |
commit | eb439384ebfe13bc95d1065fb8fb507453533efd (patch) | |
tree | f74b22a63a0e38804a89d016688868dd03441adf /utils.py | |
parent | feedgetter.py now uses MongoDB database? (diff) | |
download | newspipe-eb439384ebfe13bc95d1065fb8fb507453533efd.tar.gz newspipe-eb439384ebfe13bc95d1065fb8fb507453533efd.tar.bz2 newspipe-eb439384ebfe13bc95d1065fb8fb507453533efd.zip |
Main page almost working.
Diffstat (limited to 'utils.py')
-rwxr-xr-x | utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) |