Automating the boring process of converting YT music playlists to spotify playlists!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
The objective of this project is to make a way for users to take long music playlists on YouTube and easily convert them into Spotify playlists. It uses regex to parse through the YouTube page, identify chapters, isolate the music in each chapter, and then use the Spotify API to combine the chapters into one playlist.
There's a few libraries that you'll need to get installed before you can start messing around with playlists. To get a local copy up and running follow these simple example steps.
This is an example of how to list things you need to use the software and how to install them.
- pip
pip install re pip install bs4 pip install requests pip install spotipy
- Spotify
- Go to the Spotify developer page at https://developer.spotify.com/dashboard, login, and accept the privacy agreement.
- Click the "CREATE AN APP" button and enter some dummy information (Or actual information if you want to make a spotify app!)
- Find the "Client ID" and "Client Secret" fields and write them down for later.
-
Clone the repo
git clone https://github.com/TSKoduru/YTToSpotify.git
-
Enter the Client ID and Client Secret fields that you found earlier into the parameters at the top of the program. You'll also need to enter your spotify username.
USERNAME = 'ENTER USERNAME HERE' CLIENT_ID = 'ENTER CLIENT ID HERE' CLIENT_SECRET = 'ENTER CLIENT SECRET HERE'
To use this program, all you'll need is a youtube URL that contains music where each track is contained within its own chapter. Click the run button, paste in the link, and then type out a name for your new playlist. The program will handle the rest :D
Example usecase:
- Suppose I want to convert the following playlist: https://www.youtube.com/watch?v=OrWEsbQVO80
- If you take a look at the video, note how each track has its own chapter:

- I run the file, paste in the YT URL, then choose a name for the playlist.
- In a few seconds, this appears in my spotify library:

- Success!
- Expand functionality to include YT videos without chapters
Note: I've stopped developing this proejct, so open source contributions are welcome. See the contributions section below.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for more information.
Teja Koduru - tkoduru@umich.edu
Project Link: https://github.com/TSKoduru/YTToSpotify