npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-scdl

v1.0.2

Published

An easy to use, minimal dependency Soundcloud song downloader.

Downloads

1

Readme

node-scdl

An easy to use, minimal dependency Soundcloud song downloader.

Installation

This module uses only one dependency: Phin. This means that node-scdl is very lightweight.

To install:

npm install node-scdl

Usage

Simiply require the scdl package just like you would with any other module. Then create a new instance of the SoundCloudDownloader client using a client ID. You can find a client ID in the request headers of the Soundcloud website. Open the developer tools in your favorite browser,

const SCDL = require('node-scdl')

const SoundCloudDownloader = new SCDL('abcdefghijklmnopqrstuvwxyz123456') // This fake Client ID can be replaced with a valid one

console.log(SoundCloudDownloader.getInfo(SoundCloudDownloader.getID('https://soundcloud.com/tarroofficial/alone-ft-jutes-noey'))) // Should return a JSON response of Soundcloud Metadata (ie. {title: "alone ft. jutes x noey", artist: "tarro"})

How to obtain a client ID

  1. Open the Web Developer Tools in your favorite browser
  2. Go to the network tab
  3. Open up a tab with a SoundCloud song
  4. Select a request/response that contains song data. It should contain about 3 JSON items, one of them being a client ID
  5. Copy and paste that

API

SCDL

Constructor

Creates a new instance of the Soundcloud Downloader Params clientID (String) - A valid Soundcloud-API-V1 Client ID Usage

new SoundCloudDownloader = new SCDL(clientID)

Methods

SCDL#getInfo

Gets all of the Soundcloud Metadata for the track Params id (Number/String) - A valid Soundcloud Track ID callback (Function) (Optional) - A callback function Returns Promise<JSON> - Soundcloud Track Metadata (otherwise returns Promise<JSON> to the callback if one is provided) Usage

SoundCloudDownloader.getInfo(12345789)
SCDL#getID

Accepts the URL and resolves it to an ID that can be used with other SCDL functions Params url (Number/String) - A valid Soundcloud Track URL cb (Function) (Optional) - A callback function Returns Promise<Number> - Soundcloud Track ID (otherwise returns Promise<Number> to the callback if one is provided) Usage

SoundCloudDownloader.getID('https://soundcloud.com/tarroofficial/alone-ft-jutes-noey')
SCDL#getStream

Resolves the ID for a soundcloud track and downloads the song Params id (Number/String) - A valid Soundcloud Track ID callback (Function) (Optional) - A callback function Returns Promise<ReadableStream> - A ReadableStream containing song data (otherwise returns Promise<ReadableStream> to the callback if one is provided) Usage

SoundCloudDownloader.getStream(12345789)