throw helpful errors when RSS pages cannot be decoded
This commit is contained in:
parent
7105ba01de
commit
e239d7a09c
1 changed files with 8 additions and 1 deletions
|
@ -67,7 +67,14 @@ class Module(ModuleManager.BaseModule):
|
|||
# async url get failed
|
||||
continue
|
||||
|
||||
feed = feedparser.parse(pages[url].decode())
|
||||
try:
|
||||
data = pages[url].decode()
|
||||
except Exception as e:
|
||||
self.log.error("Failed to decode rss URL %s", [url],
|
||||
exc_info=True)
|
||||
continue
|
||||
|
||||
feed = feedparser.parse(data)
|
||||
feed_title = feed["feed"].get("title", None)
|
||||
max_ids = len(feed["entries"])*10
|
||||
|
||||
|
|
Loading…
Reference in a new issue