Skip to content

Instantly share code, notes, and snippets.

@PedroDiogo
Created January 19, 2010 23:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save PedroDiogo/281425 to your computer and use it in GitHub Desktop.
Script que vai buscar as notas de Psis e as imprime em forma de tabela
require "rubygems"
require "nokogiri"
require "open-uri"
require "terminal-table/import"
header = %w[Numero Curso Nome Bonus Grupo 1o\ Rel 2o\ Rel Proj 1o\ Exame 2o\ Exame Exame Final]
results, i = Array.new(12), 0
Nokogiri::HTML(open('http://comp.ist.utl.pt/ec-ps/Ano/09/Pauta.html')).css('tr:nth-child(261) td').each do |element|
results[i] = element.content
i += 1
end
puts Time.now.strftime("Último Update: %H:%M")
puts
puts table(header,results)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment