Recently I've decided to abandon Pandora and switch full-time to Rdio for all of my listening needs. Pandora is great but I hate not having the ability to play through all of the things I've liked over the years. I know Pandora uses those likes to determine what I hear from time-to-time, but I have some great stuff in there that I'd like to listen to more frequently.

I've been using Rdio since they first launched, but I've still used Pandora for "radio" functionality. Most often, this is in the car or when I really just want some background music. Rdio has since launched a "Station" feature which allows you to listen to similar artists, songs, etc, and it fills this need pretty well.

So I needed to find a way to get my Pandora likes into my Rdio account. Unfortunately there's nothing that will do this, since Pandora doesn't offer an API for you to quickly get to your likes (another reason I'm leaving Pandora - I want my data to be open). Fortunately, screen scraping isn't hard and Rdio has a full API.

  1. Head to http://www.pandora.com/profile/likes/username to view your likes (replace with your username, of course).
  2. Click "Show more" a bunch of times until you can see all of your likes on the page (the "Show more" link will be gone).
  3. Open up a JavaScript console and type:

    $tracks = $('div#track_like_pages div.section');
    for (var i = 0; i < $tracks.length; i++) {
        var t = $tracks.eq(i);
        var title = $.trim($('h3.normal', t).text());
        var artist = $.trim($('div.infobox-body p.s-0 a', t).eq(0).text());
        console.log(artist + ' -- ' + title);
    }
    
  4. Copy the output to a text file for later parsing. This file will spit out your liked tracks in this format:

    Artist -- Track Title
    

So now you have a text file with all of your Pandora likes... this is a good start. Now we need to get them into Rdio.

For that, I wrote a little Python script that uses the Rdio API:

https://github.com/nicksergeant/rdio-pandora-likes-importer

Follow the directions in the README and you should end up with a playlist of all of your past Pandora likes, like this.