Sunday, August 28, 2011

How to batch download all of your favorited tracks/music on 8tracks



Update: the script and method used in this post no longer works.  I made a GAE-hosted app version of this script instead; go to:  http://8trackshelper.appspot.com

I love 8tracks.  It lets me discover new music from a specific genre.  User generated playlists (mixes) are awesome because some people have great taste in music.  On that note, let me point out that the majority of these playlists aren't filled with that garbage mainstream hiphop they make these days (I know, right, what a relief).

Anyway, if you've used the site, you've probably favorited a couple of tracks that you liked and now have a long list of tracks on your profile.  Over a few months of listening to 8tracks, my favorite tracks list has accumulated about 200 tracks.  I've always wanted to download all of the songs on that list... but downloading them one by one would seriously be a pain, as you'd have to  find a reliable source, copy/paste, search, download, and rinse and repeat for each of those 200 songs.

Instead, I wanted to automate the process.  You can download music directly from 8tracks using a JS script written by Yamamaya, but only when you're playing a them from a mix.  That's a problem because there's no way to go from a favorited track on your list directly to the mix where it originates from in order to download it.  This means that you can't download the songs directly from 8tracks' servers, and you'll have to download them from somewhere else.

Problem is, there aren't many reliable sites or services to go to download MP3s quick and easy enough to automate the process.  Then, I discovered Grooveshark.  Grooveshark is a popular music streaming services that lets its users stream "any song in the world for free."  Pretty neat, eh?  Most of its content is user-uploaded, so song quality may vary (though, from what I've seen, they've always been > 128 kbps).

Grooveshark itself wasn't exactly the answer to my problem, it was a program called SciLor's grooveshark™.com Downloader, which was written by, you guessed it, a developer named SciLor.  It allows you to, among other things, batch search and then download songs from Grooveshark.  His program pretty much solves everything.  From here, all I needed to do was get my list of songs from 8tracks into plaintext with the artist name, and bam, and if everything runs smoothly I should have 200 MP3s without much effort.

To get my list of songs and respective artists in a list in plaintext,  I wrote a quick Python script to extract a user's favorited tracks when given their username.  It generates a list in the following format: <song title> - <artist>, and saves it to a text file.  All you need to do from here is copy the list into SciLor's grooveshark™.com Downloader and let it rip.  So let's go over this really quick:

Step 1
Make sure you have Python 2.7X (if not, download it here if you're using Windows).  Then, download the Python script here.  And finally, get the downloader here.

Step 2
Run 8tracks.py by either double clicking or running it from the command line (python 8tracks.py), input your username and in a few seconds, you should have your list of favorited tracks in a text file.



Step 3
If you haven't already, unzip SciLor's downloader and run it.  Go to the Extended Functions tab, and select Import from file.  Browse and select the text file that was previously generated and click Search & Add.  You should've now been sent to the main tab with all of the tracks now neatly packed into your download queue.  Click download and wait for your songs to finish.  You'll be able to find them in the Downloads folder in the program's directory.




Note: if this program batch searches too many titles in short amount of time ( > 200), I've had GrooveShark temporarily IP "ban" me for about six hours.  That means you'll be unable to use this downloader and you won't be able to search or play songs on their site for the duration of the block.  200 search queries in under a minute is not only suspicious, but it's not nice to their servers.   I recommend batch searching half, waiting a few minutes, and then doing the next half.  To do this, copy half of the list from the text file and paste it into the batch download field rather than importing it.


That's all.  Overwhelmingly simple, isn't it?

EDIT: Due to the new revamped 8tracks site, the script used in this post will no longer work.  Instead, try using this: http://8trackshelper.appspot.com.  (try my username: technix1).


22 comments:

  1. Hey buddy, thanks a million for this! Sucessfully got a list of 115 tracks via your app, and SciLor's downloader had them downloaded in no time. My meager donation does not quite sum up my appreciation!

    ReplyDelete
  2. Hi!
    Im getting the following error when I launch the EXE.
    [7/28/2012 11:19:40 PM] Start reconnecting...
    [7/28/2012 11:19:51 PM] Error: Reconnect unsuccessful - Response Error: invalid client ({"header":{"session":""},"fault":{"code":1024,"message":" invalid client"}})

    I don't use a proxy..

    Please help!

    ReplyDelete
    Replies
    1. Hmm, are you using the latest version of SciLor's grooveshark™.com Downloader? This looks like a bug fixed in a recent version of the program.

      Delete
  3. Do you have something for mac users?

    ReplyDelete
    Replies
    1. Sorry, I don't think there's a Mac version of SciLor's grooveshark™.com Downloader. If you want, you could run Windows virtually on your Mac using VM software like VMware Fusion or VirtualBox. Wine for Mac may be able to run this Windows application in OS X, check it out here: http://www.davidbaumgold.com/tutorials/wine-mac/#what-is I'm not sure how well this would work, but this would probably be worth looking into if you'd like to avoid the hassle of installing a virtual machine.

      Delete
  4. This comment has been removed by the author.

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Sorry to bother but I seem to have a problem with creating he text file. When I enter my username, it does create a text file with my username but when I open it the file is empty

    ReplyDelete
    Replies
    1. Unfortunately, that script is outdated. Try using this instead: http://8trackshelper.appspot.com/

      Delete
  7. It's going for 5 minutes trying to find the first song, is that normal?

    ReplyDelete
  8. heyyy how do we run 8tracks.py i dont know what to type in the python command window :( sorry im a noob

    ReplyDelete
  9. when i open the plain script download ie 8tracks.py it opens for half a second and then closes :/

    ReplyDelete
  10. Hi mine keeps saying
    Error: System.Exception - Unexpected response format ()
    after it finishes searching.. could you help me??

    ReplyDelete
  11. DUDE!!! you're the man.. thanks alot :D this is soooo amazing!!!

    ReplyDelete
  12. does this work with ubuntu ??

    ReplyDelete
  13. from http://www.scilor.com/grooveshark-downloader.html choose download as setup not as a zip..
    it works for me after all the problems download happen to me..

    ReplyDelete
  14. These tools are still working: http://www.buzzfeed.com/ChristineSmith2013/how-can-you-download-the-whole-playlists-on-8track-gjg0

    ReplyDelete
  15. Interesting topic shown here, i am now working on it regularly here and would say keep the future posts like this continuously. musica online

    ReplyDelete