Releases: sigma67/ytmusicapi
Releases Β· sigma67/ytmusicapi
v0.16.0
Features β¨
get_album_browse_id
: get an album'sbrowseId
based on it'saudioPlaylistId
(OLAK...
). This is based on the redirect that happens when you open a link in YouTube Music with anaudioPlaylistId
Changes β
- BREAKING
get_album
endpoint has changed for some users due to an ongoing YouTube beta (#173). With this release,get_album
will always work, but the format of the data might look different from the documentation if you have the update. Please check if this applies to your account. The documentation will be updated for the new format once the beta is released to all users. For reference, an example of the new format is provided below. A big thanks to @jake-g for providing access to his account to test this update ahead of time.
Fixes π
search
: fixed a crash if the playlist author was missing for a playlistsearch
: for songs with artists without browseId, these artists are now also returned in the result. This also applies toget_watch_playlist
get_artist_albums
: fixed an exception for singles missing a release year (#188, thanks @grray )get_artist
: fix crash if related artist is missing subscriber number- fixed
feedbackTokens
, which were incorrectlyNone
when a song was already in the library. Now the correct tokens are returned regardless of the current library status
New get_album
format
{
"title": "Revival",
"type": "Album",
"thumbnails": [
{
"url": "https://lh3.googleusercontent.com/b-euORTq-_MSzc3SyI0QOjLqnCBJbWuMmH1YlyJKAVvJfOpPqv3bFH-KSDoQwV9e8Xey1X2NRo9xZ2U=w60-h60-l90-rj",
"width": 60,
"height": 60
}
],
"description": "Revival is the ninth studio ...",
"artists": [
{
"name": "Eminem",
"id": "UCedvOgsKFzcK3hA5taf3KoQ"
}
],
"year": "2017",
"trackCount": 19,
"duration": "1 hour, 17 minutes",
"audioPlaylistId": "OLAK5uy_nMr9h2VlS-2PULNz3M3XVXQj_P3C2bqaY",
"tracks": [
{
"videoId": "iKLU7z_xdYQ",
"title": "Walk On Water (feat. BeyoncΓ©)",
"artists": [
{
"name": "Eminem",
"id": "UCedvOgsKFzcK3hA5taf3KoQ"
}
],
"album": null,
"likeStatus": "INDIFFERENT",
"thumbnails": null,
"isAvailable": true,
"isExplicit": true,
"duration": "5:03",
"feedbackTokens": {
"add": "AB9zfpJC...",
"remove": "AB9zfpJT..."
}
}
]
}
0.15.1
v0.15.0
Features β¨
- added related artist section to
get_artist
(thanks @mikefreemanwd )
Changes β
get_watch_playlist
: also accepts playlist browse ids as parameter (starting with "VLPL")- BREAKING
get_watch_playlist
: associated radio playlist is now at the top level of the dictionary as it is the same for every video in the list get_artist
:ValueError
is now returned if the provided channel Id has no music content (thanks @mikefreemanwd )
Note: get_album
may be broken right now for some users due to ongoing testing of a data structure on YouTube's side. A fix is currently being worked on and will be release when the change is live for all users (#173).
v0.14.3
v0.14.2
v0.14.1
Fixes π
- search parsing was overhauled for song/video results. It should be more reliable and crash less often. If you find any problem or missing information, please open an issue
- search correctly parses
station
results. These usually appear when your search includes the term "mix" - locale is now correctly set when a language is provided on initialization. This should prevent crashes when using get_playlist with a different language
v0.14.0
Features β¨
- requests sessions are now used by all requests except uploads per default. This improves performance by pooling TCP connections across requests on the same instance of
YTMusic()
. You can configure this behavior with therequests_session
parameter ofYTMusic()
- added shuffleId, radioId for artist results [
search
,get_artist
,get_library_artists
,get_library_subscriptions
,get_library_upload_artists
] (thanks @PhracturedBlue ) - added
isExplicit
key to album and songsearch
results - added FAQ in docs
Fixes π
get_artist_albums
,get_artist_singles
andget_user_playlists
now work again after a YouTube update- fixed a
search
edge case where unavailable songs could cause the search to crash - auth sanity check actually works now. It runs on functions that require being logged in and returns an exception if the user didn't provide authenticated headers
v0.13.1
v0.13.0
As always, thanks to all contributors for providing helpful debug information and bringing feature requests to my attention. This release contains some minor new features for existing functions and several important bug fixes.
Features β¨
get_library_upload_artist
: added limit parameter for continuationsget_watch_playlist
: added artists, album, feedbackTokens and likeStatusisExplicit
key is now available on most endpoints returning songs, most notablysearch
,get_playlist
andget_album
Changes β
- BREAKING
get_lyrics
behavior changed. If there are no lyrics,get_watch_playlist
will now returnNone
for thelyrics
key. ThelyricsFound
key no longer exists. Instead,get_lyrics
will raise an exception ifNone
is passed as thebrowseId
- 4xx HTTP error codes from the YouTube Music API will now raise an exception right away, instead of somewhat confusing error messages from parsing errors
Fixes π
- stop continuation requests if continuation contents are empty (fixes some crashes with continuations)
- fixed view/duration for video search results with missing duration (#149)
- fixed get_library_albums error if a library album has no year
v0.12.2
A release a day keeps the bugs away... hopefully.
Changes β
- potentially breaking video search results returned by
search
now contain anartists
key, since videos can now have multiple artists. As with other endpoints, each list entry containsname
andid
of the artist. - if a song search result does not contain an album, the key
album
will beNone
again, as it was before 0.12
Fixes π
- fixed several additional bugs that could cause
search
to throw an Exception - video search results now have correct
views
andduration
fields - fixed an issue with parsing the trackCount of playlists (
get_playlist
) if locale was not set correctly (#125)