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:
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.
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.
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?