Skip to content

Instantly share code, notes, and snippets.

@siuying
Created May 31, 2009 17:32
Show Gist options
  • Save siuying/120945 to your computer and use it in GitHub Desktop.
Save siuying/120945 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'scrubyt'
require 'iconv'
# Fetch the seatplan for the schedule
movies = Scrubyt::Extractor.define do
# use a proper schedule link here
fetch "http://www2.cinema.com.hk/revamp/html/show_seat.php?lang=c&show_id=13105241"
# schedule info
schedule "//table[2]" do
cinema "//tr[1]/td[2]"
house "//tr[2]/td[2]"
movie "//tr[3]/td[2]"
cat "//tr[4]/td[2]"
time "//tr[5]/td[2]"
end
end
puts Iconv.conv("UTF-8", "Big5", movies.to_xml)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment