Skip to content

Instantly share code, notes, and snippets.

@simplymathematics
simplymathematics / CopyLikes.md
Created October 7, 2025 00:11 — forked from senecaso/CopyLikes.md
YouTube Music: Copy liked music to a playlist

I was looking for a way to copy my "likes" in YouTube music over to a playlist, in the hopes of stopping YTM from losing songs I have liked. I found this script, but it didn't work for me, so I had to look for other solutions. In the end, this is what worked for me.

It's a small Python script that uses the YTMusic python library to copy tracks from my likes to a new playlist. I will try to outline the steps to run the script, but this will assume some familiarity with Python.

Hopefully this will work for others as well!

from ytmusicapi import YTMusic

yt = YTMusic('oauth.json')
@joshbode
joshbode / LICENSE.md
Last active March 27, 2025 08:35
YAML Loader with include constructor (Python 3)

MIT License

Copyright (c) 2018 Josh Bode

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: