Giter Club home page Giter Club logo

spotify-dl's Introduction

Spotify Downloader



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

 

Required

Get FFMPEG

(Node.js 14)[https://nodejs.org/en/download/package-manager/]

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

spotifydl

A simple commandline utility that allows you to download Spotify Songs, Shows, Episodes, Playlists and Albums from Youtube.

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

Installation

NPM

Install from npm registry

npm install -g spotify-dl

or You can do manually

git clone https://github.com/SwapnilSoni1999/spotify-dl
cd spotify-dl
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/SwapnilSoni1999/spotify-dl
cd spotify-dl
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

Flag Long Flag Usage
--o --output takes valid output path argument
--es --extra-search takes extra search string/term to be used for youtube search
--oo --output-only enforces all downloaded songs in the output dir
--st --saved-tracks download spotify saved tracks
--ss --saved-songs download spotify saved shows
--sp --saved-playlists download spotify saved playlists
--sa --saved-albums download spotify saved albums
--l --login Requests a login in an external window (non tty should use --u and --p)
--u --username spotify username for headless long (Note: you must use --login once to grant access)
--p --password spotify password
--cf --cache-file takes valid output file name path argument
--dr --download-report output a download report of what files failed
--cof --cookie-file takes valid file name path argument to a txt file for youtube cookies
--v --version returns current version
--h --help outputs help text

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

spotify-dl's People

Contributors

alaendle avatar benthieu avatar dependabot[bot] avatar gringineer avatar hidimpu avatar javalsai avatar josefwells avatar nij4t avatar otep avatar pavanjadhaw avatar phyzical avatar raprocks avatar swapnilsoni1999 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.