aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2011-06-13 14:23:58 +0200
committercedricbonhomme <devnull@localhost>2011-06-13 14:23:58 +0200
commitd27efb027e780ac0bdd334848f912ad37faddd2e (patch)
tree980dca3fa9db91cdb5ac62a451300cd5538c54af /utils.py
parentMinor improvement: test if the published/update date for the article is prese... (diff)
downloadnewspipe-d27efb027e780ac0bdd334848f912ad37faddd2e.tar.gz
newspipe-d27efb027e780ac0bdd334848f912ad37faddd2e.tar.bz2
newspipe-d27efb027e780ac0bdd334848f912ad37faddd2e.zip
Minor bugfix: in loaf_feed() function (number of articles to load per feed).
Diffstat (limited to 'utils.py')
-rwxr-xr-xutils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils.py b/utils.py
index 5587ce0e..d23981f5 100755
--- a/utils.py
+++ b/utils.py
@@ -372,9 +372,11 @@ def load_feed():
feed_object.mail = feed[4]
if list_of_articles != []:
+ if MAX_NB_ARTICLES != -1:
+ list_of_articles = list_of_articles[:MAX_NB_ARTICLES]
list_of_articles.sort(lambda x,y: compare(y[0], x[0]))
# Walk through the list of articles for the current feed.
- for article in list_of_articles[:MAX_NB_ARTICLES]:
+ for article in list_of_articles:
sha1_hash.update(article[2].encode('utf-8'))
article_id = sha1_hash.hexdigest()
bgstack15