Skip to content

Instantly share code, notes, and snippets.

View lucianokrebs's full-sized avatar

Luciano Krebs lucianokrebs

View GitHub Profile
require 'open-uri'
require 'nokogiri'
servidores = []
servidores_sem_salário = []
(1..5).each do |page|
url = "http://www.portaltransparencia.gov.br/servidores/OrgaoExercicio-ListaServidores.asp?CodOrg=25201&Pagina=#{page}"
raw_html = open(url).read
html = Nokogiri::HTML(raw_html)