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

@hack0x90/soundcloud-dl

v1.0.5

Published

Download songs from https://soundcloud.com

Downloads

13

Readme

README

soundcloud-dl can can be used as a standalone CLI or it can be used a dependency module in your NodeJS project to download songs from https://soundcloud.com. For demo visit https://instautils.com

CLI Usage

# Install soundcloud-dl globally
npm install -g @hack0x90/soundcloud-dl
# Create SC_CLIENT_ID env variable
export SC_CLIENT_ID='your-sound-cloud-id'
# Save song .mp3 in current directory
npx soundcloud-dl https://soundcloud.com/rashidaliofficial/bhangra-loco ./

Module USAGE

You must have a env variable SC_CLIENT_ID. How to get SoundCloud Client Id. Also see the examples folder in repo.

const getSoundCloudTrackLink = require('@hack0x90/soundcloud-dl');

async function getLink () {
  const link = await getSoundCloudTrackLink({
    scTrackUrl: 'https://soundcloud.com/rashidaliofficial/bhangra-loco',
    scClientId: process.env.SC_CLIENT_ID
  });
  console.log('------------ Link ------------');
  console.log(link);
}

getLink();

Above code will return an object as below.

{
  "url": "https://cf-hls-media.sndcdn.com/playlist/vyPUILS7Qm3Q.128.mp3/playlist.m3u8?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiKjovL2NmLWhscy1tZWRpYS5zbmRjZG4uY29tL3BsYXlsaXN0L3Z5UFVJTFM3UW0zUS4xMjgubXAzL3BsYXlsaXN0Lm0zdTgqIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNjUyNjAyNDgxfX19XX0_&Signature=LiP3OlfhuX9oeH0CxEROcEli34MaciklzSy2Gk4cvmSAeFLlPMMevh-dmOyaR1LiYODohIko4IovckBx1uf8sXz-n3xeIYxH7xSKBAathG8NnaKVlASM-jX5hfGAmBqfM1P5uu9IcXreN9L~jANdU~4yIkprfqSrnh9TSmUHZO7nyW7D~uFVWubt9T-RR4hB0nSyxYMcic0KLojEjvfTqbsm353nVSB75zEPACOeWnLaF7HgFLe6BxsITNILOUDKNfpq4SVTOPQue1JQ85DMHmTbU-sa5mvJCFgU7LWTupm8noq0FyR1M7ktAyyRw8nc~xzUo5XBCKnxuS8AdD3ssA__&Key-Pair-Id=APKAI6TU7MMXM5DG6EPQ&track_authorization=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJnZW8iOiJQSyIsInN1YiI6IiIsInJpZCI6IjU4ZTRiMDAyLTM2ZDAtNGU3Ny05NGNmLWVjOTBlMWFkOTNiYiIsImlhdCI6MTY1MjYwMjIwMn0.8JY_W5fK_ZDbUsNXvGOh_e0T40KfSYnJPvLqMM1MnXs"
}

Saving Song .mp3 File

You can use the url from the result above to download song mp3 file from SoundCloud.

# Command to save mp3 file, using above url
ffmpeg -i <soundcloud_url> <filename.mp3>

# Example
ffmpeg -i https://cf-hls-media.sndcdn.com/playlist/vyPUILS7Qm3Q.128.mp3/playlist.m3u8?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiKjovL2NmLWhscy1tZWRpYS5zbmRjZG4uY29tL3BsYXlsaXN0L3Z5UFVJTFM3UW0zUS4xMjgubXAzL3BsYXlsaXN0Lm0zdTgqIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNjUyNjAyNDgxfX19XX0_&Signature=LiP3OlfhuX9oeH0CxEROcEli34MaciklzSy2Gk4cvmSAeFLlPMMevh-dmOyaR1LiYODohIko4IovckBx1uf8sXz-n3xeIYxH7xSKBAathG8NnaKVlASM-jX5hfGAmBqfM1P5uu9IcXreN9L~jANdU~4yIkprfqSrnh9TSmUHZO7nyW7D~uFVWubt9T-RR4hB0nSyxYMcic0KLojEjvfTqbsm353nVSB75zEPACOeWnLaF7HgFLe6BxsITNILOUDKNfpq4SVTOPQue1JQ85DMHmTbU-sa5mvJCFgU7LWTupm8noq0FyR1M7ktAyyRw8nc~xzUo5XBCKnxuS8AdD3ssA__&Key-Pair-Id=APKAI6TU7MMXM5DG6EPQ&track_authorization=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJnZW8iOiJQSyIsInN1YiI6IiIsInJpZCI6IjU4ZTRiMDAyLTM2ZDAtNGU3Ny05NGNmLWVjOTBlMWFkOTNiYiIsImlhdCI6MTY1MjYwMjIwMn0.8JY_W5fK_ZDbUsNXvGOh_e0T40KfSYnJPvLqMM1MnXs track.mp3

SoundCloud Client Id

To get SoundCloud client id, simply play any song on SoundCloud website. Open DevTools Network tab. Filter by Fetch/XHR and look for requests in the lower panel with client_id param.

SoundCloud Client ID

TODO Items

  • [ ] Check for external dependencies before running the module
  • [ ] Proxy input
  • [ ] Playlist download
  • [ ] Download by artist
  • [ ] Download by hashtag
  • [ ] Create Mashup/Mix with download option
  • [ ] Read playlist links from file
  • [ ] Work with pool of SoundCloud client ids