mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Streams] Attempt to fix unclear error in youtubestream (#4148)
This commit is contained in:
parent
c673bb0979
commit
0cc04706f6
@ -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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user