A simple Python script to transfer songs from a YouTube playlist of your choice into a new Spotify playlist
You will need
- Youtube Data API credentials
- Spotify Web API credentials
- Follow this link step by step to create the API requisites
- Next download the 'client_secret.json' file. It may downlaod with a different name,please rename it as mentioned here. Remember to place it in the same folder as the other files
- Get your spotify user id in the Account Overview section
- Visit spotify developer console and do the following:
- First login with your spotify account credentials
- Next click on 'create an app' name it as you wish , accept the terms and hit create
- Click on 'edit settings', and add
http://localhost:8888/
under 'Redirect URIs', then click save - Now you will be able to view client ID and client secret (click show client secret)
- copy the client id , client secret and your user id into the 'spotify_secrets.py' file
To install dependencies run
pip install -r requirements.txt
Run this in your terminal
python script.py