Created
January 14, 2010 22:13
-
-
Save adammck/277568 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /* | |
| * 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