spotituby
v1.0.0
Published
Download music from Spotify and Youtube playlists or tracks
Maintainers
Readme
Spotituby
Spotituby is a Node.js-based application that simplifies downloading music from Spotify playlists and YouTube. Designed for command-line enthusiasts, it provides a clean interface to download tracks and playlists in MP3 format.
Features
Spotify Integration:
- Fetches user playlists and tracks directly from Spotify.
- Requires authentication using Spotify API.
- Allows selection of individual tracks or entire playlists for download.
YouTube Integration:
- Downloads tracks or playlists using YouTube links.
- Converts videos to MP3 format with customizable output.
Prerequisites
Ensure the following dependencies are installed:
Node.js and npm: Required for running the application.
# Check if npm is installed npm -v
Install Node.js from Node.js official site if necessary.
Python 3: Used for creating a virtual environment and downloading YouTube content.
python3 --version
yt-dlp: Installable through your system package manager or pip.
# macOS / Linux sudo apt install yt-dlp # Windows (via Chocolatey) choco install yt-dlp
mandb: For manual page installation.
sudo apt install man-db
Installation
Clone the repository:
git clone <repository-url> cd Spotituby
Install dependencies:
npm install
Run the installation script to set up the environment and application dependencies:
sudo ./install.sh
NOTE: This script has only been tested on Mac, beware
- Set up Spotify API credentials:
- Visit Spotify Developer Dashboard.
- Create a new app and note the
Client ID
andClient Secret
. - Add the redirect URI:
http://localhost:3000/callback
. - Save your credentials in a
.env
file in the root directory of this app:SPOTIFY_CLIENT_ID=<your-client-id> SPOTIFY_CLIENT_SECRET=<your-client-secret>
Usage
1. Running the Application
node index.js --mode cli --url <spotify-or-youtube-url>
NOTE: This app has two modes, cli and server. Server mode is still not fully implemented. Use cli only for now
2. Examples
Download a Spotify playlist:
node index.js --mode cli --url https://open.spotify.com/playlist/4nT7b2XU4sVWp8Rt7A6WqI
Download a YouTube playlist:
node index.js --mode cli --url https://www.youtube.com/playlist?list=PLv9ZK9k7ZDjW5mDlMQm4eMjR4kxY9e8Ji
Troubleshooting
Invalid Spotify Token:
- Ensure your
.env
file contains valid Spotify API credentials. - Clear the token file (
TOKENFILE
) and reauthenticate.
- Ensure your
YouTube Download Issues:
- Verify
yt-dlp
is installed and accessible.
- Verify
Disclaimer
Spotituby is intended for personal use only. It's a hobby project lmao 😂