Skip to content

Instantly share code, notes, and snippets.

@tanatana
Created October 30, 2012 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tanatana/3980399 to your computer and use it in GitHub Desktop.
Save tanatana/3980399 to your computer and use it in GitHub Desktop.
トリック オア
# -*- coding: utf-8 -*-
require 'nokogiri'
require 'open-uri'
random = 'http://ja.wikipedia.org/wiki/Special:Randompage'
page = Nokogiri::HTML(open(random))
puts "トリック オア #{page.search('title').text.split(" ")[0]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment