I've been using Pandora One for the last couple years and in that time I've "liked" quite a few songs. If I move to a new music service I don't want to lose my list, but unfortunately Pandora doesn't have a feature to export liked songs. There are a few options floating around online, but none worked for my private account.

I wrote a little bit of javascript to turn this:
Example pandora likes page.
into this:
List of liked songs.

How To Use It

Copy-paste the script into your browser developer console with Pandora open. You can find the script on GitHub here. A javascript bookmarklet will be added soon.

How It Works

The script can be broken down into three basic areas: scraping the page, parsing the song details, and displaying the results. You'll find a basic overview of each below.


In all likelyhood you're going to want to get this data into some other format, like a spreadsheet. An easy solution is to plop a big <div> over the entire page. As songs are parsed, a new line will be added with the artist and title. Once everything is loaded, a quick copy-paste is all that is needed to export the data.

$('body').prepend('<div id="pe-song-list"></div>')
$('#pe-song-list').css('position', 'absolute')
                  .css('left', 10)
                  .css('top', 10)
                  .css('right', 10)
                  .css('padding', 10)
                  .css('border', '5px solid #000')
                  .css('background', '#fff')
                  .css('color', '#000')
                  .css('z-index', 99999);

The song title and artist are incredibly easy to locate. Each like is enclosed in a div with the class .infobox-body and both the title and artist are contained in children <a> tags. In order to keep the DOM from swelling in size as we parse songs, we'll delete every like after the information is copied.

function findAllSongs(){
        var title = $(this).find('h3 a').text();
        var artist = $(this).find('p a').first().text();

        $('#pe-song-list').prepend('<p>' + artist + ',' + title + '</p>');

Now all we need to do is scrape every song from the page and click 'Show more', until there are none left. The first two calls to setTimeout() navigate to the likes page, then a call to setInterval() automates clicking the 'Show More' link four times a second.

        }, 250);
    }, 100);
}, 100);


You can find this project on GitHub, feel free to create a pull request.