Hotfix for twitch alert system

Streams were erroneously marked as inexistant in case of error. Most
likely fixed.
This commit is contained in:
Twentysix 2016-01-08 20:53:43 +01:00
parent cc8b4b0585
commit be4ccc4bfc

3
red.py
View File

@ -1387,7 +1387,8 @@ async def twitchAlert():
try:
url = "https://api.twitch.tv/kraken/streams/" + stream["NAME"]
data = requests.get(url).json()
if "error" in data: #Stream doesn't exist, remove from list
if "status" in data:
if data["status"] == 404: #Stream doesn't exist, remove from list
to_delete.append(stream)
elif "stream" in data:
if data["stream"] != None: