Skip to content

Instantly share code, notes, and snippets.

@adammck
Created January 14, 2010 22:13
Show Gist options
  • Save adammck/277568 to your computer and use it in GitHub Desktop.
Save adammck/277568 to your computer and use it in GitHub Desktop.
/*
* run this in firebug to extract a list of the
* album/artist/track names from any browse page
* at lala.com, then acquire them from a less
* obnoxious source. outputs csv.
*/
(function() {
var extract = function() {
var data = $.map(
$("table.defTable tr"),
function(x) {
return [[
$("a.lartistlink", x).text(),
$("a.lalbumlink", x).text(),
$("span.songTitle", x).text()
]];
}
);
console.log($.map(data, function(x) {
return x.join(",")
}).join("\n"));
};
if(typeof(jQuery) == "undefined") {
var jq = document.createElement("script");
jq.src = "http://code.jquery.com/jquery-latest.js";
jq.onload = extract;
document.documentElement.appendChild(jq);
// jquery is already loaded
} else extract();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment