Skip to content

Instantly share code, notes, and snippets.

@KattyaCuevas
Created July 25, 2014 16:38
Show Gist options
  • Save KattyaCuevas/97f7a86595ba54fcdf36 to your computer and use it in GitHub Desktop.
Save KattyaCuevas/97f7a86595ba54fcdf36 to your computer and use it in GitHub Desktop.
Script para hacer web scrapping con Ruby
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