aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcfg/pyAggr3g470r.cfg-sample1
-rwxr-xr-xutils.py3
2 files changed, 2 insertions, 2 deletions
diff --git a/cfg/pyAggr3g470r.cfg-sample b/cfg/pyAggr3g470r.cfg-sample
index f7c73e14..d4b3d6e1 100755
--- a/cfg/pyAggr3g470r.cfg-sample
+++ b/cfg/pyAggr3g470r.cfg-sample
@@ -1,5 +1,6 @@
[global]
sqlitebase = ./var/feed.db
+max_nb_articles = 50
[mail]
mail_from = pyAggr3g470r@no-reply.com
mail_to = address_of_the_recipient@example.com
diff --git a/utils.py b/utils.py
index 131cf643..5587ce0e 100755
--- a/utils.py
+++ b/utils.py
@@ -62,14 +62,13 @@ config = ConfigParser.RawConfigParser()
config.read("./cfg/pyAggr3g470r.cfg")
path = os.path.abspath(".")
sqlite_base = os.path.abspath(config.get('global', 'sqlitebase'))
+MAX_NB_ARTICLES = int(config.get('global', 'max_nb_articles'))
mail_from = config.get('mail','mail_from')
mail_to = config.get('mail','mail_to')
smtp_server = config.get('mail','smtp')
username = config.get('mail','username')
password = config.get('mail','password')
-MAX_NB_ARTICLES = -1
-
# regular expression to chech URL
url_finders = [ \
re.compile("([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}|(((news|telnet|nttp|file|http|ftp|https)://)|(www|ftp)[-A-Za-z0-9]*\\.)[-A-Za-z0-9\\.]+)(:[0-9]*)?/[-A-Za-z0-9_\\$\\.\\+\\!\\*\\(\\),;:@&=\\?/~\\#\\%]*[^]'\\.}>\\),\\\"]"), \
bgstack15