Turn your Spotify playlists into fully-organized MP3 libraries, complete with YouTube downloads and BPM detection.
⚡ Powered by:
spotify-to-mp3/
├── 0-spotify-to-urls/ # Extracts Spotify tracks → YouTube URLs (+BPMs)
│ ├── spotify-to-urls.py
│ ├── requirements.txt
│ ├── songs.csv
│ └── songs-url.txt
│
├── 1-downloader/ # Downloads MP3s from YouTube links
│ ├── downloader.py
│ ├── yt_downloader_config.json
│ └── requirements.txt
│
├── 2-mp3-organizer/ # Cleans & tags your MP3 collection
│ └── mp3-organizer.py
│
└── README.md
pip install -r requirements.txt- ✅ Extract Spotify playlists with track names & artists
- ✅ Find YouTube matches automatically
- ✅ Detect BPMs (via SongBPM)
- ✅ Download MP3s with metadata
- ✅ Organize your collection neatly
This project is for educational purposes only.
This step extracts all tracks from a Spotify playlist, finds the best YouTube match, and (optionally) retrieves the BPM.
👉 Results are saved into:
songs.csv→ structured data (title, artist, YouTube link, BPM)songs-url.txt→ YouTube URLs only
- Create a
.envfile inside0-spotify-to-urls/:
OUTPUT_FILE=songs.csv
SPOTIFY_CLIENT_ID=<your client id>
SPOTIFY_CLIENT_SECRET=<your client secret>
SPOTIFY_PLAYLIST_ID=<your spotify playlist id>
HANDLE_BPM=True- Setup dependencies:
# required once for browser automation (BPM retrieving)
playwright install- Run the script:
python spotify-to-urls.pyUses yt-dlp (via AswinOP YT Downloader) to download MP3s from the YouTube URLs.
-
Follow the AswinOP YT Downloader setup during
execution -
Run the script:
python downloader.pyFinal step: clean up, add metadata, and organize your MP3 library into proper folders.
👉 Reads from the CSV generated in step 0, and moves files from the downloader into an organized structure (sorted by BPM if HANDLE_BPM = True).
- Add to the
.envfile:
CSV_FILE=../0-spotify-to-urls/songs.csv
ROOT_FOLDER=../1-downloader/downloads
DEST_FOLDER=./mp3-organized- Run the script:
python mp3-organizer.py