mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 09:56:05 -05:00
[Streams] Attempt to fix unclear error in youtubestream (#4148)
This commit is contained in:
@@ -190,6 +190,12 @@ class YoutubeStream(Stream):
|
||||
raise StreamNotFound()
|
||||
elif "items" in data:
|
||||
return data["items"][0][resource]
|
||||
elif (
|
||||
"pageInfo" in data
|
||||
and "totalResults" in data["pageInfo"]
|
||||
and data["pageInfo"]["totalResults"] < 1
|
||||
):
|
||||
raise StreamNotFound()
|
||||
raise APIError()
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
Reference in New Issue
Block a user