Created
February 5, 2013 13:00
-
-
Save uu59/4714311 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
# -- 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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fuck you