Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
spottydl
Advanced tools
Readme
A NodeJS Spotify Downloader package without any API Keys or authentication from Spotify or Youtube-Music.
However, this requires ffmpeg to be installed on your system...
Make sure you have ffmpeg installed on your system preferably version >= 4.0
# NPM
npm i spottydl
# Yarn
yarn add spottydl
// If you use plain Javascript
const SpottyDL = require('spottydl')
// If typescript
import SpottyDL from 'spottydl'
(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
}
*/
(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'
}
*/
(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 (Successful)
[
{ status: 'Success', filename: '~/somePath/Never Gonna Give You Up.mp3' }
]
*/
/* Example Output (Failed)
[
{
status: 'Failed (stream)',
filename: ~/somePath/Never Gonna Give You Up.mp3,
id: 'lYBUbBu4W08', // videoId from YT-Music
tags: {
title: 'Never Gonna Give You Up',
artist: 'Rick Astley',
year: '1987-11-12',
...
}
}
]
*/
(async() => {
await SpottyDL.getAlbum("https://open.spotify.com/album/66MRfhZmuTuyGCO1dJZTRB")
.then(async(results) => {
let album = await SpottyDL.downloadAlbum(results, "output/", false)
console.log(album)
});
})();
/* Example Output (Successful)
[
{ status: 'Success', filename: 'output/Crush.mp3' },
{ status: 'Success', filename: 'output/Sesame Syrup.mp3' }
]
*/
/* Example Output (Failed) some tracks failed proceed to use `retryDownload()` method
[
{
status: 'Failed (Stream)',
filename: 'output/Crush.mp3',
id: YT-Music id,
tags: {
// tags for the track...
}
},
{ status: 'Success', filename: 'output/Sesame Syrup.mp3' }
]
*/
(async() => {
await SpottyDL.getPlaylist("https://open.spotify.com/playlist/29zGkCDLvy7embGQEwuqGj")
.then(async(results) => {
let playlist = await SpottyDL.downloadPlaylist(results, "output/", false)
console.log(playlist)
});
})();
/* Example Output (Successful)
[
{ status: 'Success', filename: 'output/Crush.mp3' },
{ status: 'Success', filename: 'output/Sesame Syrup.mp3' }
]
*/
(async() => {
await SpottyDL.getAlbum("https://open.spotify.com/album/66MRfhZmuTuyGCO1dJZTRB")
.then(async(results) => {
let album = await SpottyDL.downloadAlbum(results, "output/", false)
let res = await SpottyDL.retryDownload(album);
console.log(res) // boolean or <Results[]>
});
})();
// Using a while loop until all tracks have no errors (Experimental)
(async() => {
await SpottyDL.getAlbum("https://open.spotify.com/album/66MRfhZmuTuyGCO1dJZTRB")
.then(async(results) => {
let album = await SpottyDL.downloadAlbum(results, "output/", false)
let res = await SpottyDL.retryDownload(album);
while(res != true) {
res = await SpottyDL.retryDownload(res);
console.log(res) // boolean or <Results[]>
}
});
})();
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
And other notable NodeJS Spotify downloader projects :D
FAQs
NodeJS Spotify Downloader without any API Keys or Authentication
The npm package spottydl receives a total of 223 weekly downloads. As such, spottydl popularity was classified as not popular.
We found that spottydl demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.