mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 15:26:01 +03:00
[GH-ISSUE #191] get_artist_albums(channelId, params) returning KeyError: 'content' #147
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#147
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MarkhorDev on GitHub (Apr 19, 2021).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/191
I'm trying to fetch a list of artist albums for artists with more albums than can be displayed in the get_artist() results. Sometimes it works, but other times I get:
I have tried looking at the original code but it is far too advanced for me. I have tried comparing data and found that the params variable is changing each time that I get it from get_artist() results, but don't know what is causing the error on certain calls, but not others.
@sigma67 commented on GitHub (Apr 19, 2021):
Could you kindly provide the channelId?
@MarkhorDev commented on GitHub (Apr 19, 2021):
AC/DC: UCB0JSO6d5ysH2Mmqz5I9rIw
Anathema: UCD_YQdIsW1phqp5AqQwmKhg
get_artist_albums() is called in a function, called from a loop. It works if I try and do it on its own but it just breaks in the loop
@sigma67 commented on GitHub (Apr 20, 2021):
I can't replicate the error consistently either, but I see what you're referring to. I think it might be a timing issue, that get_artist_albums is being called too fast after get_artist and the server doesn't have the albums ready yet. Perhaps you can get more consistent results by adding a delay between the two calls?
But yea, it's just the server being flaky, not much we can do here on the ytmusicapi side imo.
@MarkhorDev commented on GitHub (Apr 20, 2021):
I tried a few different delays and still got the issue with 3 seconds. Seemed to work fine with 5-second delays. Might just be a good idea to take out the loop and find a more efficient solution for what I'm trying to do. Thank you for your help.
@sigma67 commented on GitHub (Apr 20, 2021):
To be honest this endpoint is quite awkward to work with, since it directly depends on another endpoint being called before. This clearly violates REST principles, where requests are supposed to be isolated, stateless and independent of each other.
But unfortunately it's all we have. Since there is no other way to access an official API, we have to work with it. Good luck in your endeavor.