get rss feed xml ourselves so feedparser.parse can't hang on us
This commit is contained in:
parent
d4fd841af2
commit
e30ae803b0
1 changed files with 4 additions and 2 deletions
|
@ -36,7 +36,8 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
for url, channels in hooks.items():
|
for url, channels in hooks.items():
|
||||||
try:
|
try:
|
||||||
feed = feedparser.parse(url)
|
data = utils.http.request(url)
|
||||||
|
feed = feedparser.parse(data.data)
|
||||||
except:
|
except:
|
||||||
feed = None
|
feed = None
|
||||||
|
|
||||||
|
@ -75,7 +76,8 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
def _check_url(self, url):
|
def _check_url(self, url):
|
||||||
try:
|
try:
|
||||||
feed = feedparser.parse(url)
|
data = utils.http.request(url)
|
||||||
|
feed = feedparser.parse(data.data)
|
||||||
except:
|
except:
|
||||||
feed = None
|
feed = None
|
||||||
if not feed or not feed["feed"]:
|
if not feed or not feed["feed"]:
|
||||||
|
|
Loading…
Reference in a new issue