Skip to content

Instantly share code, notes, and snippets.

@uu59
Created February 5, 2013 13:00
Show Gist options
  • Save uu59/4714311 to your computer and use it in GitHub Desktop.
Save uu59/4714311 to your computer and use it in GitHub Desktop.
# -- coding: utf-8
require "rubygems"
require "grill"
Grill.implant <<-G
source :rubygems
gem "nokogiri"
gem "httpclient"
gem "bundler", :require => "pp"
G
url = "http://www.kotsu.metro.tokyo.jp/subway/schedule/mita.html"
res = HTTPClient.get url
doc = Nokogiri::HTML.parse(res.body)
message = doc.at_css('.InformationUnkou td').inner_html
puts message
HTTPClient.post("http://im.kayac.com/api/post/#{ENV["IMKAYAC_ID"]}", :message => message)
@umut123
Copy link

umut123 commented Feb 5, 2013

fuck you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment