The YouTube Music API errored consistently after ~1900 requests being sent, so to counter this, the program sends requests in batches of 1000Įach batch calls the API and provides the same callback function. This program will generate multiple files if the input is over 3000 songs, but you have to remember to only upload one per day. Last.fm only allows for 3000 scrobbles per day before it limits your account, Leading to a ~90% success rate in getting album names. This works, however given that 1000s of queries need to be executed quickly, not all of them are successful, The only way to get around this is by querying the YouTube API for each song, and then taking the album variable from it. Last.fm wants more data, most importantly, album information. Containing only song name, artist, and time. The inputted file is filtered to only include songs from these topic artists, meaning they all are "official" songs. I found that every song officially published was published under the "Artist Name - Topic" format (Ex: Kanye West - Topic) This means I couldn't include all YTM results, as random one-off remixes and other songs uploaded by single people Given that YouTube Music is just a fancy UI for watching YouTube Videos, not all of the entries are actual songs, Luckily, all YouTube Music entries are flagged with a header, so the file is easy to parse. The only way you can is by going to and exporting your YouTube Music has no way to export your history. I reccommend Last.fm-Scrubbler-WPF and it's File Parse Scrobble,īut others should work. The rest is automatic and it should produce one or more formatted.json files which you can upload to a bulk scrobbler. Then, simply run Start.bat (or run node index.js in a terminal).ĭue to all of the API requests, it is not the most stable and may end prematurely, if this happens, just restart it and it should work What To Do Once You Get The File Take the watch-history.json file and drag it into the youtube-music-history-scrobbler directory, While you are waiting, download or clone this github repo and unzip it.Īll of the dependencies and other files come with it, so there is no installation. This should give you a folder with lots of data, but the file we are looking for is " watch-history.json" Request the data and wait for a download. You first need to go to Google Takeout and download your youtube data in JSON format.įirst uncheck all of the categories except " YouTube and YouTube Music"Ĭlick on the " Multile formats" button, and switch the History option from HTML to JSON, I found solutions for Spotify and other services, but none for YTM. After recently starting to use Last.fm, I wondered if there was a way to import my previous listening.
0 Comments
Leave a Reply. |