[Streams] Fixed streamalert not using Client-ID

This commit is contained in:
Twentysix 2016-09-15 03:40:14 +02:00
parent b67ba23c00
commit 2203c7b261

View File

@ -317,8 +317,9 @@ class Streams:
async def twitch_exists(self, stream): async def twitch_exists(self, stream):
url = "https://api.twitch.tv/channels/" + stream url = "https://api.twitch.tv/channels/" + stream
header = {'Client-ID': self.settings.get("TWITCH_TOKEN", "")}
try: try:
async with aiohttp.get(url) as r: async with aiohttp.get(url, headers=header) as r:
data = await r.json() data = await r.json()
if "error" in data: if "error" in data:
return False return False