mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 07:16:00 +03:00
[GH-ISSUE #481] get_playlist(playlist_id) throws an error at line 112 due to structural page changes #358
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#358
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 @marcuma on GitHub (Dec 1, 2023).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/481
Describe the bug
When attempting to get the songs from a playlist, a Key Error is thrown when attempting to get the playlistId from the nav result.
In the reference docs, under get_artist it says to call get_playlist with the browseId, but uder get_playlist and the function header it says to use playlistId, so I tried it with both. b browseId returns a 404 and playlistId throws the above error.
I could be doing something wrong, but from what I can tell, it looks like the data structure being returned from nav isn't as expected and the key can't be located.
Here is the client code that produced the error (Note that the channel ID is hard coded).
@marcuma commented on GitHub (Dec 1, 2023):
I looked at this for a little bit. It looks like they changed the format of the page/json. Some keys were removed and some added, and the track data is much deeper. Most of playlist.py after the response returns would have to be rewritten to accommodate the change.
@sigma67 commented on GitHub (Dec 18, 2023):
You're using
get_playlistto retrieve an album, of course it's not working.Use
get_album_browse_idto retrieve thebrowseIdbelonging to aaudioPlaylistId, then callget_album.