From e30ae803b010b712ea232199efd819b093ac44d4 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 27 Jun 2019 11:56:50 +0100 Subject: [PATCH] get rss feed xml ourselves so feedparser.parse can't hang on us --- modules/rss.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/rss.py b/modules/rss.py index 30f91f81..ad94ad59 100644 --- a/modules/rss.py +++ b/modules/rss.py @@ -36,7 +36,8 @@ class Module(ModuleManager.BaseModule): for url, channels in hooks.items(): try: - feed = feedparser.parse(url) + data = utils.http.request(url) + feed = feedparser.parse(data.data) except: feed = None @@ -75,7 +76,8 @@ class Module(ModuleManager.BaseModule): def _check_url(self, url): try: - feed = feedparser.parse(url) + data = utils.http.request(url) + feed = feedparser.parse(data.data) except: feed = None if not feed or not feed["feed"]: