🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

spotifydl-music

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spotifydl-music

Spotify Songs, Playlist & Album Downloader

1.1.8
latest
Source
npm
Version published
Weekly downloads
1
-75%
Maintainers
1
Weekly downloads
 
Created
Source

Spotify Downloader



Download audio files from spotify links(Based on: youtube-dl)

 

Original

spotify-dl made by SwapnilSoni1999

Required

Get FFMPEG

Node.js 14

Note: if you run into issues related to puppeteer chromium download please try PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install -g spotifydl-music

spotifydl-music

A simple commandline utility that allows you to download Spotify Songs, Shows, Episodes, Playlists and Albums from Youtube music. The important difference from the original spotify-dl is, that this is actually pulling the songs from youtube music as a song, so it will download official songs.

PLEASE NOTE:

  • The ability to find a video is dependent on the fact it is hosted on youtube, and even then there is a chance it is still incorrectly matched
  • Some items may only be available to spotify premium users, please be sure to provide a username and password when this is the case
  • It is very likely that the song is only found if it is an actual song on youtube music too.

Installation

NPM

Install from npm registry

npm install -g spotifydl-music

or You can do manually

git clone https://github.com/Fiotux/spotifydl-music
cd spotifydl-music
npm install
npm link

Android (Termux)

PS: You may need to type termux-setup-storage first and allow storage permission

sh -c "$(curl -fsSL https://raw.githubusercontent.com/SwapnilSoni1999/spotify-dl/master/tools/termux.sh)"

Docker

Build docker image:

git clone https://github.com/Fiotux/spotifydl-music
cd spotifydl-music
docker build -t spotify-dl .

Usage

To download highest quality audio file

spotifydl <spotify track/album/playlist link> ...

 

Example

spotifydl https://open.spotify.com/track/xyz

Options

FlagLong FlagUsage
--o--outputtakes valid output path argument
--es--extra-searchtakes extra search string/term to be used for youtube search
--oo--output-onlyenforces all downloaded songs in the output dir
--sf--search-formatprovide template for youtube api, supportsalbumName, artistName,itemName
"something {itemName} - {albumName} anyrandomextrastring"
--of--output-formatprovide template for output of filenames, supportsalbumName, artistName,itemName
3 x _ are used to signify directories
"something___{artistName}{albumName}{itemName}"
--ef--exclusion-filterscomma separated string of exclusion filters
each filter will be checked against the description and title if found the link will be ignored
--st--saved-tracksdownload spotify saved tracks
--ss--saved-songsdownload spotify saved shows
--sp--saved-playlistsdownload spotify saved playlists
--sa--saved-albumsdownload spotify saved albums
--l--loginRequests a login in an external window (non tty should use --u and --p) (Docker without -it is non tty)
--u--usernamespotify username for headless long (Note: you must use --login once to grant access)
--p--passwordspotify password
--cf--cache-filetakes valid output file name path argument
--dr--download-reportoutput a download report of what files failed
--cof--cookie-filetakes valid file name path argument to a txt file for youtube cookies
--v--versionreturns current version
--h--helpoutputs help text
--dl--download-lyricsenables downloading of lyrics
--oft--output-file-typechoose which type of file to be output as

Notes

To use --u and --p (headless login) you must do a --l once first to grant required permissions (playlists, saved songs ect.)

if you receive 'Got a spotify api error WebapiRegularError: An error occurred while communicating with Spotify's Web API Details: non existing id' you may need to provide auth either use --l for manual login prompt or --u username --p password for headless login

If you receive a 429 error please provide a cookies file given the --cof flag, to generate a cookies file please refer to Chrome or Firefox

Docker

docker run -it --user=$(id -u):$(id -g) -v $(pwd):/download --rm spotify-dl <options-to-spotify-dl defaults to --help>
docker run -it --user=$(id -u):$(id -g) -v $(pwd):/download --rm spotify-dl "https://open.spotify.com/...."

Acknowledgements

thanks to icons8 for icons in hero image and all the contributors for PR, suggestions and testing :love:

 

License

MIT © Swapnil Soni

Keywords

spotify-dl

FAQs

Package last updated on 21 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts