Created
July 28, 2013 23:46
-
-
Save nicksergeant/6101152 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Head to "http://www.pandora.com/profile/likes/[[ username ]]" and fire up your JS console. | |
// 2. Click "Show more" a bunch of times until you have all of your loved tracks on the page. | |
// 3. Cache all of the track DOM objects. | |
$tracks = $('div#track_like_pages div.section'); | |
// 4. Iterate and spit out the data. | |
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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment