Skip to content

l0gic5/spotify-to-mp3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎵 Spotify → MP3 (with BPMs retrieving)

Turn your Spotify playlists into fully-organized MP3 libraries, complete with YouTube downloads and BPM detection.

⚡ Powered by:


📂 Project Structure

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

🔧 Setup

pip install -r requirements.txt

✨ Features

  • ✅ Extract Spotify playlists with track names & artists
  • ✅ Find YouTube matches automatically
  • ✅ Detect BPMs (via SongBPM)
  • ✅ Download MP3s with metadata
  • ✅ Organize your collection neatly

⚠️ Disclaimer

This project is for educational purposes only.



🪟 Project Modules

🚀 0 – Spotify to URLs

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

🔧 Config & Run

  1. Create a .env file inside 0-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
  1. Setup dependencies:
# required once for browser automation (BPM retrieving)
playwright install
  1. Run the script:
python spotify-to-urls.py

📥 1 – Downloader

Uses yt-dlp (via AswinOP YT Downloader) to download MP3s from the YouTube URLs.

🔧 Config & Run

  1. Follow the AswinOP YT Downloader setup during execution

  2. Run the script:

python downloader.py

🎶 2 – MP3 Organizer

Final 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).

🔧 Setup

  1. Add to the .env file:
CSV_FILE=../0-spotify-to-urls/songs.csv
ROOT_FOLDER=../1-downloader/downloads
DEST_FOLDER=./mp3-organized
  1. Run the script:
python mp3-organizer.py

About

Turn your Spotify playlists into fully-organized MP3 libraries, complete with YouTube downloads and BPM detection

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages