Google Play Music EOL
Closed this issue · 1 comments
Google Play Music will join the Google Graveyard before 2020 ends.
This means a new service for its replacement, Youtube Music, must be added.
There is no publicly documented API but some effort was put in a thoroughly documented python library (ytmusicapi) which could greatly help in implementing the few calls combine.fm should need.
It seems there is no need for authentication to perform searches.
This task is up for grabs, I might find the motivation next time I need to share a track.
I've been looking into this tonight and I found out some stuff.
-
Songs
When you click on the "share" button from a song, ytmusic gives an url like this one:https://music.youtube.com/watch?v=YLp2cW7ICCU&feature=share
, this is very similar to a youtube url. This id we get from parsing this url,YLp2cW7ICCU
, can be used in theget_song
method from the ytmusicapi to get back information about a song. My impression is that we have all info we need there, no need for signups or tokens :) -
Albums (easy one)
You can browse an album using thehttps://music.youtube.com/browse/MPREb_9C36yscfgmJ
url. The id after /browse,MPREb_9C36yscfgmJ
again, can be used in theget_album
method and once more it seems to me we have all info we might need there, and again, no need for signups or tokens :) -
Albums (tricky one)
When you click the "share" button for an album, you get an url that looks likehttps://music.youtube.com/playlist?list=OLAK5uy_lx9K5RpiBEwd3E4C1GKqY7e06qTlwydvs
. Now, you can use that on theget_watch_playlist_shuffle
method and it will give you a whole playlist. If you open that url with js enabled, the path gets converted onto that previous one, the easy one. I couldn't find a way to jump from one to the other, it seems the album url comes in some json that's loaded by the ytmusic app and so on. One way I could deal with that one is to parse the playlist and if all songs match one album, fallback to the previous method.
I haven't yet started looking into the search methods. But I'll finish up writing the parse for the first two parts and open a PR :)