Merge Upstream

This commit is contained in:
Akamaru 2017-10-17 22:48:47 +02:00
commit 77e673a54d

5
bot.py
View File

@ -246,7 +246,10 @@ def check_feed(bot, key):
logger.info(feed_url)
data = feedparser.parse(feed_url)
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
if 'title' not in data.feed:
feed_title = data.feed['link']