aboutsummaryrefslogtreecommitdiff
path: root/src/web/lib/feed_utils.py
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-12-12 22:15:19 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-12-17 09:42:56 +0100
commitf4b94165bb2e6e06eabcb05c4d5e5be4cd2265b7 (patch)
treeb04ad1a26edd4c67701d0d704c8ce8c554b2ae42 /src/web/lib/feed_utils.py
parentmoving the root of source code from / to /src/ (diff)
downloadnewspipe-f4b94165bb2e6e06eabcb05c4d5e5be4cd2265b7.tar.gz
newspipe-f4b94165bb2e6e06eabcb05c4d5e5be4cd2265b7.tar.bz2
newspipe-f4b94165bb2e6e06eabcb05c4d5e5be4cd2265b7.zip
handling failing feed link
Diffstat (limited to 'src/web/lib/feed_utils.py')
-rw-r--r--src/web/lib/feed_utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/web/lib/feed_utils.py b/src/web/lib/feed_utils.py
index f39fe693..f3b18224 100644
--- a/src/web/lib/feed_utils.py
+++ b/src/web/lib/feed_utils.py
@@ -47,7 +47,11 @@ def construct_feed_from(url=None, fp_parsed=None, feed=None, query_site=True):
or all(bool(feed.get(k)) for k in ('link', 'title', 'icon_url')):
return feed
- response = requests.get(feed['site_link'], verify=False)
+ try:
+ response = requests.get(feed['site_link'], verify=False)
+ except Exception:
+ logger.exception('failed to retreive %r', feed['site_link'])
+ return feed
bs_parsed = BeautifulSoup(response.content, 'html.parser',
parse_only=SoupStrainer('head'))
bgstack15