aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfetch.py2
-rw-r--r--pyaggr3g470r/crawler.py2
-rw-r--r--pyaggr3g470r/views.py2
3 files changed, 4 insertions, 2 deletions
diff --git a/fetch.py b/fetch.py
index 67b9b710..f599ca3a 100755
--- a/fetch.py
+++ b/fetch.py
@@ -26,6 +26,6 @@ if __name__ == "__main__":
for user in users:
if user.activation_key == "":
- print "Fetching articles for", user.nickname
+ print("Fetching articles for", user.nickname)
feed_getter = crawler.FeedGetter(user.email)
feed_getter.retrieve_feed(feed_id)
diff --git a/pyaggr3g470r/crawler.py b/pyaggr3g470r/crawler.py
index d65d03bd..b933f6aa 100644
--- a/pyaggr3g470r/crawler.py
+++ b/pyaggr3g470r/crawler.py
@@ -128,6 +128,8 @@ class FeedGetter(object):
"""
logger.info("Fetching the feed: " + feed.title)
a_feed = feedparser.parse(feed.link, handlers=[self.proxy])
+ if a_feed['bozo'] == 1:
+ logger.error(a_feed['bozo_exception'])
if a_feed['entries'] == []:
return
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 63026f41..ffc7a53b 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -267,7 +267,7 @@ def fetch(feed_id=None):
Triggers the download of news.
News are downloaded in a separated process, mandatory for Heroku.
"""
- utils.fetch(g.user.email, None)
+ utils.fetch(g.user.email, feed_id)
flash(gettext("Downloading articles..."), 'info')
return redirect(redirect_url())
bgstack15