GithubHelp home page GithubHelp logo

douile / node-spotify-youtube-downloader Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 1.0 827 KB

Download songs from youtube then add tags with spotify web API

Home Page: https://www.npmjs.com/package/node-spotify-youtube-downloader

License: Apache License 2.0

JavaScript 100.00%
spotify spotify-api spotify-web-api spotify-downloader youtube-api youtube-dl youtube-downloader youtube-music music music-downloader id3 id3v2 id3v2-tag mp3-tags

node-spotify-youtube-downloader's Introduction

node-spotify-youtube-downloader

Download playlists or albums from spotify via youtube, then automatically add id3 tags using data from spotify web API.

About

CLI not yet ready

A spotify web API token is needed, you can generate one in the Web API Console

Apache 2.0 license

Usage

Install

npm install --save node-spotify-youtube-downloader

Import

const { download, tag } = require('node-spotify-youtube-downloader');
download(...);
tag(...)
// OR
const downloader = require('node-spotify-youtube-downloader');
downloader.download(...);
downloader.tag(...);

Download

/* Download and tag songs */
download({
  /* URI of item to download
  * Can be retrieved in spotify using right click -> share -> Copy Spotify URI
  * ATM only playlist and album are supported */
  spotifyURI: 'spotify:album:50Zz8CkIhATKUlQMbHO3k1',
  /* Path to download files
  Make sure this folder exists otherwise program will error */
  downloadPath: '../download/',
  /* Spotify web API Token */
  spotifyToken: 'YOUR_TOKEN_HERE',
  /* Range of items to download (1-n) as an array
  Setting to undefined or omitting will cause all tracks to be used */
  range: [2,4]
}).then(() => {console.log('Download complete')}).catch(console.error);

Tag

/* Search for songs as they would be named by program and add the id3 tags from spotify
Options have same syntax as download */
tag({
  spotifyURI: 'spotify:album:50Zz8CkIhATKUlQMbHO3k1',
  downloadPath: '../download/',
  spotifyToken: 'YOUR_TOKEN_HERE',
  range: [2,4]
}).then(() => {console.log('Tagging complete')}).catch(console.error);

TODO

  • Add CLI
  • Improve logging (download progress etc)
  • Improve API

node-spotify-youtube-downloader's People

Contributors

douile avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

peanutbother

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.