Last active
August 29, 2015 14:01
-
-
Save moisespsena/01589b22051946ba655a to your computer and use it in GitHub Desktop.
Generate one list with name of book, the book identification and number of chapters and print it to console, in http://bible.com/bible
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
var data = []; | |
jQuery("#menu_book UL LI A").each(function() { | |
var l = $(this); | |
l.click(); | |
data[data.length] = [ | |
l.text().replace(/(^\s+|\s+$)/g, ''), | |
l.attr('data-book'), | |
$("#chapter_selector LI:last").text().replace(/(^\s+|\s+$)/g, '') | |
] | |
}); | |
for(var i=0; i < data.length; i++) { | |
data[i] = data[i].join(";") | |
} | |
console.log(data.join("\n")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment