Downloading Songs from Soundcloud

Published 2012-11-21 on Farid Zakaria's Blog

The next task

I've been fiddling around with HypeMachine for quite a while now even though my personal music taste has taken me elsewhere in search of music. Lately, I've been enjoying subscribing to individual artists on Soundcloud as a way of finding more niche electronica.

My experience so far with Soundcloud has been great. They even let you download some songs based on settings set by the artist! I however want the music while I'm on the go; especially on my jogs. I've now moved onto the task of seeing how I can liberate much of my beloved music from Soundcloud similarly to what I've accomplished with HypeMachine.


Once again most of the information gleamed was from saving the raw HTML of a request to SoundCloud outside the browser (i.e. via python or perl). They look to be doing something similar to HypeMachine in removing certain HTML elements because I cannot find them when I view source through my browser.

<script type="text/javascript">
                              "title":"got stoned and mixed really old records for half an hour",

We can see one of the track elements is the streamURL:


Node.JS Style

Grabbing the bufferTracks variable can easily be accomplished in Node.JS with the help of the jsdom. I'd simply need to build the DOM according to the HTML file and access the JavaScript variable! I'm curious if there is even an easier way.... Drop a comment if you know of one!