mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 15:26:01 +03:00
[GH-ISSUE #26] get_artist and get_album are broken #18
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#18
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 @stephen-huan on GitHub (May 26, 2020).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/26
I tried the
get_artistandget_albumexamples in the documentation, but both seem to be broken. I tried with and without headers_auth.json.Traceback for
get_artistTraceback for
get_albumOperating system is macOS, Python version is 3.8.2, ytmusicapi version is 0.7.1.
@sigma67 commented on GitHub (May 26, 2020):
The
get_artisterror was fixed in20e44873d3, which unfortunately didn't make the 0.7.1 release. A 0.8.0 release will be coming soon which includes the fix. Meanwhile you can work with the latest version by runningpip install git+https://github.com/sigma67/ytmusicapi.As for
get_album, you need to provide a browseId as specified in the function signature. You are passing the album's audioPlaylistId, which doesn't work with the endpoint that's used byget_album.The function could be expanded to work with audioPlaylistIds as well, but it would require an additional request. On the Web UI, when you open https://music.youtube.com/playlist?list=OLAK5uy_k0i7Z0ehZyxEGt9vVQz0EoHvRI96jVMY8, YouTube Music provides some javascript that contains the album's browseId. So ytmusicapi could provide a helper function to get the album browseId from the audioPlaylistId, which uses that GET request and parses the response HTML. But I'm not sure if that's of any practical use, since the other API endpoints provide browseIds for albums.
@stephen-huan commented on GitHub (May 26, 2020):
Thanks for the help: when I updated the package, I could get those examples to work.
However, I still can't get a few artists to work.
This works:
https://music.youtube.com/channel/UClyW5VlmRBdFlRWLpMoHlbQ
But these don't:
https://music.youtube.com/channel/UC8y3Cf-TB5cTNugNtDl6XWw
https://music.youtube.com/channel/UCEsOqBVe_DNEUAer9TYk6bw
Traceback for the first one:
Traceback for the second:
The first error appears to be caused by an artist without a description, but I thought that was fixed in a recent commit. The second artist has a description, but the error is different.
ytmusicapi version is most recent git commit (from Pipfile.lock):
@sigma67 commented on GitHub (May 27, 2020):
Good catch, I never tested that function for artists without description or with few songs. Should be fixed now.