Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spottydl

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spottydl - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

5

dist/Download.js

@@ -19,3 +19,3 @@ "use strict";

*/
const downloadTrack = async (obj, outputPath = __dirname) => {
const downloadTrack = async (obj, outputPath = './') => {
try {

@@ -70,3 +70,3 @@ // Check type and check if file path exists...

*/
const downloadAlbum = async (obj, outputPath = __dirname) => {
const downloadAlbum = async (obj, outputPath = './') => {
try {

@@ -107,2 +107,3 @@ if ((0, index_1.checkType)(obj) != "Album") {

let tagStatus = node_id3_1.default.update(tags, filename);
console.log(tagStatus ? `Finished: ${filename}` : `Failed to add tags: ${filename}`);
if (i == obj.tracks.length) {

@@ -109,0 +110,0 @@ resolve(Results);

2

package.json
{
"name": "spottydl",
"version": "0.1.0",
"version": "0.1.1",
"description": "NodeJS Spotify Downloader without any API Keys or Authentication",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -1,8 +0,17 @@

# spottydl
# Spottydl
### A NodeJS Spotify Downloader package without any API Keys or Authentication
A **NodeJS Spotify Downloader** package without any API Keys or authentication from Spotify or Youtube-Music.
However, this **requires [ffmpeg](https://ffmpeg.org/download.html)** to be installed on your system...
## Project Status
- [x] **Automatic tagging of .mp3 files** using [Node-ID3](https://github.com/Zazama/node-id3) includes _Year, Artist, Album, Title, and Art Cover_
- [x] **Simple and easy to use**, contains only 4 usable methods 🤔 I do need some help optimizing some parts
- [ ] Error checking, when downloading Tracks or Albums, like retrying the process when status failed...
## Installation
_Make sure you have ffmpeg installed on your system preferably version >= 4.0_
```sh

@@ -15,5 +24,117 @@ # NPM

Examples coming soon please wait
## Usage
#### First we require/import the module
```JS
// If you use plain Javascript
const SpottyDL = require('spottydl')
// If typescript
import SpottyDL from 'spottydl'
```
#### Getting a Track Info
```JS
(async() => {
await SpottyDL.getTrack("https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT")
.then(results => { // Returns a <Track>
console.log(results)
});
})();
/* Example Output
{
title: 'Never Gonna Give You Up',
artist: 'Rick Astley',
year: '1987-11-12',
album: 'Whenever You Need Somebody',
id: 'lYBUbBu4W08', // videoId From Youtube-Music
albumCoverURL: 'https://i.scdn.co/image/ab67616d0000b2735755e164993798e0c9ef7d7a',
trackNumber: 1
}
*/
```
#### Getting an Album/Single Info
```JS
(async() => {
await SpottyDL.getAlbum("https://open.spotify.com/album/2mxFsS5yylSTHNivV53HoA")
.then(results => { // Returns an <Album>
console.log(results)
});
})();
/* Example Output
{
name: 'Cigarettes After Sex',
artist: 'Cigarettes After Sex',
year: '2017-06-09',
tracks: [
{ name: 'K.', id: 'L4sbDxR22z4', trackNumber: 1 },
...
],
albumCoverURL: 'https://i.scdn.co/image/ab67616d0000b27394d280f0006107be47bb4fe7'
}
*/
```
#### Downloading a Track
```JS
(async() => {
await SpottyDL.getTrack("https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT")
.then(async(results) => {
let track = await SpottyDL.downloadTrack(results, "~/somePath") // Second parameter is optional...
console.log(track)
});
})();
/* Example Output
{
status: true,
filename: '~/somePath/Never Gonna Give You Up.mp3',
id: 'lYBUbBu4W08'
}
*/
```
#### Downloading an Album/Single
```JS
(async() => {
await SpottyDL.getAlbum("https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT")
.then(async(results) => {
let album = await SpottyDL.downloadAlbum(results)
console.log(album)
});
})();
/* Example Output
[
{
status: true,
filename: "./'K.'.mp3",
id: 'L4sbDxR22z4'
},
{...}
]
*/
```
## Notes
What this module simply does is that it scrapes data from Spotify, then finds the right track/song from Youtube-Music.
Hence, there's no illegal action or DRM bypass being done within this module, as all data is freely taken and used the right way
## Special Thanks to:
[ytdl-core](https://github.com/fent/node-ytdl-core)
[ytmusic-api](https://github.com/zS1L3NT/ts-npm-ytmusic-api)
[node-id3](https://github.com/Zazama/node-id3)
And other notable NodeJS Spotify downloader projects :D
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc