A simplistic way to find songs from a Spotify playlist on YouTube.
IMPORTANT: Please check the issue I've pinned here.
All you gotta do is insert your >>PUBLIC<< Spotify playlist URL when prompted, then the app will automatically search all songs from that playlist on YouTube and return the URLs. Check below for instructions on how to make it work:
1 - To use the script, you gotta register your app on both the Spotify and YouTube API services.
2 - When you finish doing that, create a JSON file named "config.json" on the project's main folder.
3 - The config.json file must have the following format:
{
"spotify":
{
"client_id": "your_spotify_client_id",
"client_secret": "your_spotify_client_secret"
},
"youtube":
{
"api_key": "your_youtube_api_key",
"client_id": "your_youtube_client_id",
"client_secret": "your_youtube_client_secret"
}
}
I used the following libraries:
- Spotipy (For handling the Spotify API)
- YouTube Python (For handling the YouTube API)
- Beautiful Soup (For the YouTube alternative search)
Studying purpouses, and it might actually be useful to someone. I think Discord bots could use that to queue songs and stuff.