Convert YouTube playlists to Spotify playlists with intelligent song matching powered by Gemini AI.
-
Clone the repository:
git clone https://github.com/Underemployed/yt-to-spotify-playlist.git cd yt-to-spotify-playlist
-
Create
secret.py
from template:# YouTube API Key # Get from: https://console.cloud.google.com/apis/dashboard GOOGLE_API_KEY = "your_youtube_api_key" # Spotify API Keys # Get from: https://developer.spotify.com/dashboard SPOTIFY_CLIENT_ID = "your_spotify_client_id" SPOTIFY_CLIENT_SECRET = "your_spotify_client_secret" # Gemini API Keys # Get from: https://ai.google.dev/gemini-api/docs/text-generation?lang=python GEMINI_API_KEYS = [ "gemini_api_key_1", "gemini_api_key_2", "gemini_api_key_3", "gemini_api_key_4" ]
-
Install dependencies:
pip install -r requirements.txt
-
Run the app:
python main.py
-
Access at: http://localhost:8080
- Log in with your Spotify account
- Enter a YouTube channel ID
- Select playlists to import
- Watch real-time progress as songs are matched and imported
- Import YouTube playlists to Spotify with smart song matching
- Real-time progress tracking with server-sent events
- Batch processing for efficient imports
- Multiple API key support with automatic rotation
- Intelligent title/artist parsing using Gemini AI
- Handles remixes, covers, and various video title formats
This project is licensed under the MIT License. See the LICENSE file for more details.