Created
November 12, 2012 06:40
-
-
Save tosik/4057842 to your computer and use it in GitHub Desktop.
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 | |
| require 'open-uri' | |
| module Ikioi | |
| module_function | |
| def run | |
| puts ActiveSupport::JSON.decode(open('http://2ch-ranking.net/ranking.json?board=gameswf') | |
| .read.sub('callback(', '').sub(/\);$/, '')).find {|item| item['title'].include? "あらあらかしこ" }['ikioi'] | |
| rescue | |
| puts 0 | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment