From 911eb4145913c6eec7d5e3d60c2a1f2ac5c9bf82 Mon Sep 17 00:00:00 2001 From: phxntxm Date: Wed, 21 Sep 2016 14:11:21 -0500 Subject: [PATCH] Added the url to the logging method, based on twitch saying not client id is specified --- cogs/twitch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cogs/twitch.py b/cogs/twitch.py index d931bca..a3d68c1 100644 --- a/cogs/twitch.py +++ b/cogs/twitch.py @@ -105,11 +105,13 @@ class Twitch: url = result['twitch_url'] user = re.search("(?<=twitch.tv/)(.*)", url).group(1) + twitch_url = "https://api.twitch.tv/kraken/channels/{}?client_id={}".format(user, self.key) with aiohttp.ClientSession() as s: - async with s.get("https://api.twitch.tv/kraken/channels/{}?client_id={}".format(user, self.key)) as r: + async with s.get(twitch_url) as r: data = await r.json() with open("twitch_testing", 'w') as f: json.dump(data, f) + print("URL was: {}".format(twitch_url), file=f) fmt = "Username: {}".format(data['display_name']) fmt += "\nStatus: {}".format(data['status'])