Spotitube is a simple CLI tool designed to synchronize and download your music across platforms. Whether you want to back up your Spotify Liked Songs or migrate a YouTube Music playlist to high-quality local MP3s, Spotitube handles the heavy lifting with multi-threaded efficiency.
- Cross-Platform: Fetch tracks from Spotify (liked songs, playlists) and YouTube Music.
- High-Fidelity Downloads: Default 320kbps mp3 extraction using
yt-dlpandffmpeg. - Multi Threaded Downloads: Multi-threaded architecture for rapid searching and downloading.
- Smart Deduplication: Automatically filters duplicate tracks when merging sources.
- Session Persistence: Securely handles YouTube Music cookies for private library access.
- Python 3.9+
- FFmpeg: Essential for audio conversion.
- Windows 10/11:
winget install ffmpeg - macOS:
brew install ffmpeg - Linux: Use your package manager. (e.g.,
sudo apt install ffmpegfor Debian-based systems)
- Windows 10/11:
-
Clone the repository:
git clone https://github.com/4ngel2769/spotitube.git cd spotitube -
Set up a virtual environment:
# Windows python -m venv venv .\venv\Scripts\activate # macOS/Linux python3 -m venv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
- Visit the Spotify Developer Dashboard.
- Create a new application to obtain your Client ID and Client Secret.
- Set the Redirect URI to
http://127.0.0.1:8888/callback. - Create a
.envfile in the root directory:SPOTIFY_CLIENT_ID=your_id_here SPOTIFY_CLIENT_SECRET=your_secret_here SPOTIFY_REDIRECT_URI=http://127.0.0.1:8888/callback
To access private playlists or "Liked Songs":
- Open
music.youtube.comin your browser and log in. - Open DevTools (F12) > Network tab.
- Find any request to
music.youtube.comand copy thecookieheader value. - The script will prompt you to paste this on the first run, or you can manually create
ytmusic_cookie.txt.
Launch the interactive CLI:
python script.py- Select Source: Choose Spotify (1), YouTube Music (2), or Both (3).
- Download Mode: Enter
yto download files ornto just generate a JSON report. - Select Content: Choose between Liked Songs or specific playlists.
- Process: The script will begin concurrent processing. Files are saved to
i/downloaded_songs/.
If you find this tool useful, consider supporting the development:
Distributed under the MIT License. See LICENSE for more information.
Built with 💚 by angeldev0

