Spotify Playlist Generator is a tool that allows you to automatically create and manage Spotify playlists based on your liked YouTube vidoes and custom YouTube playlists.
- Automatically adds liked YouTube vidoes to a Spotify playlists named "YouTube Liked Playlist."
- Allows you ti save YouTube videos to custo Spotify playlists with names matching your YouTube playlists.
Before you begin, make sure to install all the required dependencies by running the following command:
pip3 install -r requirements.txt
To interact with Spotify API, you need to obtain your Spotify User ID and an OAuth Token. Here's how:
-
**User ID: ** Log in Spotify and go to your Account Overview. Your User ID is your Spotify username.
-
**OAuth Token: ** Visit the following URL yo get your OAuth Token: Spotify OAuth Token Generator. Click the "Get Token" button to generate your token.
-
Configure Secrets:
Create a secrets.py
file in the project directory and add your Spotify User ID and OAuth Token as follows:
spotify_token = "..."
spotify_user_id = "..."
- Enable OAuth For Youtube and download the
client_secrets.json
.
Run the create_playlist.py
script to start using the Spotify Playlist Generator:
python3 create_playlist.py
The script will automatically add liked YouTube videos to Spotify playlist named "YouTube Liked Playlist" and match custom YouTube playlists to Spotify playlists based on thier names.
- Youtube Data API v3
- Spotify Web API
- Requests Library v 2.22.0
- Youtube_dl v 2020.01.24 (allows you to download videos from Youtube)