AttributeError bei ungültigem Feed gefixt
This commit is contained in:
parent
4bf64b3f0f
commit
4cb19a7ba5
2
bot.py
2
bot.py
@ -246,7 +246,7 @@ 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))
|
logger.warning('Kein gültiger Feed, Status-Code ' + str(data["status"]))
|
||||||
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