Merge Upstream
This commit is contained in:
commit
77e673a54d
5
bot.py
5
bot.py
@ -246,7 +246,10 @@ def check_feed(bot, key):
|
|||||||
logger.info(feed_url)
|
logger.info(feed_url)
|
||||||
data = feedparser.parse(feed_url)
|
data = feedparser.parse(feed_url)
|
||||||
if 'link' not in data.feed:
|
if 'link' not in data.feed:
|
||||||
logger.warning('Kein gültiger Feed, Status-Code ' + str(data["status"]))
|
if 'status' in data and data["status"] != 200:
|
||||||
|
logger.warning('Kein gültiger Feed, HTTP-Status-Code ' + str(data["status"]))
|
||||||
|
else:
|
||||||
|
logger.warning('Kein gültiger Feed: ' + str(data.bozo_exception))
|
||||||
return None
|
return None
|
||||||
if 'title' not in data.feed:
|
if 'title' not in data.feed:
|
||||||
feed_title = data.feed['link']
|
feed_title = data.feed['link']
|
||||||
|
Reference in New Issue
Block a user