
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
simple-spotify
Advanced tools
npm install simple-spotify
const { Spotify } = require('simple-spotify');
// or
import { Spotify } from 'simple-spotify';
// Create an instance of the Spotify class
const spotify = new Spotify();
// Specify special options
const spotify = new Spotify({
/*
* Here you can define the api endpoints which are used
* Should only be necessary when Spotify changes it's API
* and I neglect to update this package
*/
});
// await can only be used in an async functions
const playlist = await spotify.playlist('https://open.spotify.com/playlist/0vvXsWCC9xrXsKd4FyS8kM?si=c809d19fc04440af');
// or
/*
* The seconds argument is to fetch 'all' tracks from this playlist
* Spotify only returns 100 tracks as a maximum, so to get all tracks
* you will have to collect them by 'GET'-requesting more links
*/
const playlist = await spotify.playlist('0vvXsWCC9xrXsKd4FyS8kM', true);
// Use songs
for (const item of playlist.tracks.items) {
const song = item.track;
console.log(song.name);
console.log(song.artists[0].name);
}
const album = await spotify.album('https://open.spotify.com/album/3iTOoFTl3JWm4jZx9sK7R8');
// or
const album = await spotify.album('0vvXsWCC93iTOoFTl3JWm4jZx9sK7R8xrXsKd4FyS8kM');
// get songs
const songs = await album.tracks(true); // <- true for all tracks (default: true)
for (const song of songs) {
console.log(song.name);
console.log(song.artists[0].name);
}
const track = await spotify.track('https://open.spotify.com/track/3KriJcc1OwpynDFQtzGNZN');
// or
const track = await spotify.track('3KriJcc1OwpynDFQtzGNZN');
console.log(track.name);
console.log(track.artists[0].name);
FAQs
A simple spotify api for fetching songs and playlists
We found that simple-spotify demonstrated a not healthy version release cadence and project activity because the last version was released 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.