mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
Fixed error for inexistent beam.pro streams
Apparently beam.pro is too lazy to use json when inexistent streams are requested
This commit is contained in:
parent
5c3f321d19
commit
659164e158
@ -254,9 +254,9 @@ class Streams:
|
||||
|
||||
async def beam_online(self, stream):
|
||||
url = "https://beam.pro/api/v1/channels/" + stream
|
||||
async with aiohttp.get(url) as r:
|
||||
data = await r.json()
|
||||
try:
|
||||
async with aiohttp.get(url) as r:
|
||||
data = await r.json()
|
||||
if "online" in data:
|
||||
if data["online"] == True:
|
||||
return True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user