Created
July 25, 2014 16:38
-
-
Save KattyaCuevas/97f7a86595ba54fcdf36 to your computer and use it in GitHub Desktop.
Script para hacer web scrapping con Ruby
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
require 'nokogiri' | |
require 'open-uri' | |
page = Nokogiri::HTML(open('http://www.mef.gob.pe/contenidos/tipo_cambio/tipo_cambio.php')) | |
page.css("select[name='nuevo_ano'] option").each do |option| | |
puts option.content | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment