-
-
Save hagiyaki/1641241 to your computer and use it in GitHub Desktop.
byunしながらオギョヒーっていう時用 / earthquake.gem plugin
This file contains hidden or 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 -*- | |
# ogyohee tweet / earthquake plugin | |
# | |
# ogyohee: http://shindanmaker.com/152454 | |
# | |
require 'httpclient' | |
Earthquake.init do | |
command :byunogyo do | |
url = "http://shindanmaker.com/152454" | |
html = HTTPClient.new.post(url, { :u => rand(Time.now.to_i), :from => ""} ) | |
r = nil | |
html.body.split("\n").detect{|e| r = e.match(/>\s+?(.+)#{url}/)} | |
text=r[1].force_encoding("UTF-8") | |
input(text.each_char.inject(""){|s,c| s << "=͟͟#{c}"}) if r | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment