From ff7e5ddee47060127b1d7f10c4775a407529cf8f Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Mon, 8 Aug 2016 16:39:50 -0500 Subject: [PATCH] Corrected the URL checked --- cogs/picarto.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cogs/picarto.py b/cogs/picarto.py index 47108e6..f8cf809 100644 --- a/cogs/picarto.py +++ b/cogs/picarto.py @@ -46,9 +46,12 @@ class Picarto: return member_url = member_url['picarto_url'] + stream = re.search("(?<=picarto.tv/)(.*)", url).group(1) + url = '{}/channel/{}?key={}'.format(base_url,stream,key) with aiohttp.ClientSession(headers={"User-Agent": "Bonfire/1.0.0"}) as s: - async with s.get(member_url) as r: + async with s.get(url) as r: response = await r.text() + data = json.loads(response) things_to_print = ['channel','commissions_enabled','is_nsfw','program','tablet','followers','content_type'] fmt = "\n".join("{}: {}".format(i, r) for i,r in data.items() if i in things_to_print)