itj-spotify-dl
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

itj-spotify-dl

**itj-spotify-dl ** is a Node.js Spotify downloader package that does not require API keys or authentication from Spotify or YouTube Music. Please ensure you have FFmpeg installed on your system (preferably version >= 4.0).

Installation

Ensure FFmpeg is installed, then install the package:

# NPM
npm i itj-spotify-dl


# Yarn
yarn add itj-spotify-dl

Usage

Import the Module

const itj-spotify-dl = require('itj-spotify-dl');
// or for TypeScript
import itj-spotify-dl from 'itj-spotify-dl';

Get Track Information

(async () => {
    const results = await itj-spotify-dl.getTrack("https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT");
    console.log(results);
})();

Get Album/Single Information

(async () => {
    const results = await itj-spotify-dl.getAlbum("https://open.spotify.com/album/2mxFsS5yylSTHNivV53HoA");
    console.log(results);
})();

Download a Track

(async () => {
    const results = await itj-spotify-dl.getTrack("https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT");
    const track = await itj-spotify-dl.downloadTrack(results, "~/somePath");
    console.log(track);
})();

Download an Album/Single

(async () => {
    const results = await itj-spotify-dl.getAlbum("https://open.spotify.com/album/66MRfhZmuTuyGCO1dJZTRB");
    const album = await itj-spotify-dl.downloadAlbum(results, "output/", false);
    console.log(album);
})();

Download a Playlist

(async () => {
    const results = await itj-spotify-dl .getPlaylist("https://open.spotify.com/playlist/29zGkCDLvy7embGQEwuqGj");
    const playlist = await itj-spotify-dl .downloadPlaylist(results, "output/", false);
    console.log(playlist);
})();

Retry a Failed Download

(async () => {
    const results = await itj-spotify-dl.getAlbum("https://open.spotify.com/album/66MRfhZmuTuyGCO1dJZTRB");
    const album = await itj-spotify-dl.downloadAlbum(results, "output/", false);
    const res = await itj-spotify-dl.retryDownload(album);
    console.log(res); // boolean or <Results[]>
})();

Notes

itj-spotify-dl scrapes data from Spotify and finds the corresponding track or song on YouTube Music. It does not engage in illegal actions or DRM bypass.

Special Thanks To

Readme

Keywords

none

Package Sidebar

Install

npm i itj-spotify-dl

Weekly Downloads

1

Version

0.2.2

License

MIT

Unpacked Size

33.3 kB

Total Files

11

Last publish

Collaborators

  • itjupiter