aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2014-01-13 13:47:05 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2014-01-13 13:47:05 +0100
commit40333fa6da3d299d98adaecf913a419dbf9d3dce (patch)
tree0846ddfb3ed846e0907be51e0a395600861018ec
parentrequests is now too using the defined proxy. (diff)
downloadnewspipe-40333fa6da3d299d98adaecf913a419dbf9d3dce.tar.gz
newspipe-40333fa6da3d299d98adaecf913a419dbf9d3dce.tar.bz2
newspipe-40333fa6da3d299d98adaecf913a419dbf9d3dce.zip
Continue on exception.
-rw-r--r--pyaggr3g470r/feedgetter.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pyaggr3g470r/feedgetter.py b/pyaggr3g470r/feedgetter.py
index eee9ea2b..7bf87fea 100644
--- a/pyaggr3g470r/feedgetter.py
+++ b/pyaggr3g470r/feedgetter.py
@@ -110,12 +110,14 @@ class FeedGetter(object):
nice_url = article.link.encode("utf-8")
try:
# resolves URL behind proxies (like feedproxy.google.com)
- r = requests.get(article.link, timeout=2.0, proxies=self.proxies)
+ r = requests.get(article.link, timeout=10.0, proxies=self.proxies)
nice_url = r.url.encode("utf-8")
except Timeout:
pyaggr3g470r_log.warning("Timeout when getting the real URL of %s." % (article.link,))
+ continue
except Exception as e:
pyaggr3g470r_log.warning("Unable to get the real URL of %s. Error: %s" % (article.link, str(e)))
+ continue
# remove utm_* parameters
parsed_url = urlparse(nice_url)
qd = parse_qs(parsed_url.query, keep_blank_values=True)
bgstack15