diff options
-rwxr-xr-x | source/cfg/pyAggr3g470r.cfg-sample | 2 | ||||
-rwxr-xr-x | source/utils.py | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/source/cfg/pyAggr3g470r.cfg-sample b/source/cfg/pyAggr3g470r.cfg-sample index 95db75c5..e0be2975 100755 --- a/source/cfg/pyAggr3g470r.cfg-sample +++ b/source/cfg/pyAggr3g470r.cfg-sample @@ -1,5 +1,3 @@ -[global] -max_nb_articles = 50 [MongoDB] address = 127.0.0.1 port = 27017 diff --git a/source/utils.py b/source/utils.py index 9efe9d83..d1d2c684 100755 --- a/source/utils.py +++ b/source/utils.py @@ -54,6 +54,7 @@ from BeautifulSoup import BeautifulSoup from datetime import datetime from collections import Counter +import conf # regular expression to chech URL url_finders = [ \ @@ -209,8 +210,8 @@ def send_mail(mfrom, mto, feed_title, article_title, description): msg.attach(part2) # Send the message via local SMTP server. - s = smtplib.SMTP(smtp_server) - s.login(username, password) + s = smtplib.SMTP(conf.smtp_server) + s.login(conf.username, conf.password) # sendmail function takes 3 arguments: sender's address, recipient's address # and message to send - here it is sent as one string. s.sendmail(mfrom, mto, msg.as_string()) |