Created
November 7, 2012 03:19
-
-
Save mateuspontes/4029396 to your computer and use it in GitHub Desktop.
Bible mechanized
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
require 'rubygems' | |
require 'mechanize' | |
agent = Mechanize.new | |
# params | |
book = "sl" | |
chapter = "100" | |
verse = [1,2,3,4] | |
text = [] | |
# search for verses | |
verse.each do |vers| | |
text << agent.get("http://www.bibliaonline.com.br/acf/" + book + "/" + chapter).search("//*[@id='content']/article/div/section/p[" + vers.to_s + "]") | |
end | |
# print each verse | |
text.each { |t| puts t.children } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment