diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-09-08 11:26:55 +0200 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-09-08 11:26:55 +0200 |
commit | 2f99de25a32248e7479a8b624563cd74381b96bd (patch) | |
tree | aae13f65119aa84eb336c2ce4be77acb99829b73 /source | |
parent | Log errors when trying to fetch an URL. (diff) | |
download | newspipe-2f99de25a32248e7479a8b624563cd74381b96bd.tar.gz newspipe-2f99de25a32248e7479a8b624563cd74381b96bd.tar.bz2 newspipe-2f99de25a32248e7479a8b624563cd74381b96bd.zip |
Log erros in feedgetter.py
Diffstat (limited to 'source')
-rwxr-xr-x | source/feedgetter.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/feedgetter.py b/source/feedgetter.py index 6be8b28d..d8a053b0 100755 --- a/source/feedgetter.py +++ b/source/feedgetter.py @@ -39,6 +39,9 @@ import search import utils import mongodb +import log +pyaggr3g470r_log = log.Log() + list_of_threads = [] @contextmanager @@ -81,7 +84,7 @@ class FeedGetter(object): else: with opened_w_error(conf.FEED_LIST) as (f, err): if err: - print("List of feeds not found.") + pyaggr3g470r_log.error("List of feeds not found.") else: for a_feed in f: # test if the URL is well formed @@ -159,8 +162,7 @@ class FeedGetter(object): description = BeautifulSoup(description, "html.parser").decode() article_title = BeautifulSoup(article.title, "html.parser").decode() except Exception as E: - print("Problem when sanitizing the content of the feed: " + feed_link) - print(E) + pyaggr3g470r_log.error("Problem when sanitizing the content of the feed: " + feed_link) article_title = article.title try: |