Last active
December 20, 2015 05:57
-
-
Save kimitoboku/f6ce0bfed4c64d514be2 to your computer and use it in GitHub Desktop.
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 'open-uri' | |
require 'pp' | |
require 'nokogiri' | |
require 'kconv' | |
URL = "https://www.ead.tut.ac.jp/board/main.aspx" | |
doc = Nokogiri::HTML.parse(open(URL).read.toutf8) | |
lectureCancellation = doc.xpath(%Q[//table[@id="grvCancel"]]) | |
lectureCancellation.text.split(/(\s\s\s+)/).each do |i| | |
if(i =~ /\(.\)/)then | |
puts i.gsub("\t", "").gsub("\r", "").gsub("\n", "") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment