Ytm-extractor: Import YouTube Music listens to ListenBrainz

YouTube Music to ListenBrainz

Submit your YTM listens from your Google Takeout.

Note:

This is not fool-proof, some listens are under Various Artists or Release and as such will not be properly matched. However, from my experience importing a year of listens (12k listens), 95-99% of listens get properly matched and a couple are left to do by hand.

Disclaimer:

  • I’m not responsible for messed up histories, unmatched listens, thermonuclear war, or you getting fired because your taste in music is bad.
  • YOU are choosing to use this software, and if you point the finger at me for messing up your ListenBrainz history, I will laugh at you.

Downloads: Release 1.0: First Release · defvs/ytm-extractor · GitHub

Source: GitHub - defvs/ytm-extractor

Usage

1. Getting the Takeout data

Go through this link, and request your YouTube History: https://takeout.google.com/settings/takeout

You should find the necessary file under Takeout/YouTube and YouTube Music/history/watch-history.html

2. Getting your ListenBrainz Token

You will need to get your ListenBrainz token through: ListenBrainz

3a. Submitting everything

java -jar ytm-extractor.jar -i "path/to/watch-history.html" -t "listenbrainz token"

3b. Submitting after/before (with Unix epoch, in seconds.)

java -jar ytm-extractor.jar -i "path/to/watch-history.html" -t "listenbrainz token" --before 1722791449 --after 1722532249

Let me know if there’s any issue, feel free to raise one on the repo in GitHub. Cheers!

7 Likes