Skip to content

Instantly share code, notes, and snippets.

@gongo
Created December 28, 2009 13:23
Show Gist options
  • Save gongo/264666 to your computer and use it in GitHub Desktop.
Save gongo/264666 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'rubygems'
require 'open-uri'
require 'nokogiri'
# http://subeki.akahoshitakuya.com/
class Subeki
def initialize
@base_uri = 'http://subeki.akahoshitakuya.com/n/'
end
def koto(name)
list = Nokogiri::HTML(open(@base_uri + name).read)/'.list_detail/ul/li'
list.each do |li|
puts li.text
end
end
end
subeki = Subeki.new
subeki.koto("gongo")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment