Skip to content

Instantly share code, notes, and snippets.

@atomicules
Created December 16, 2009 13:31
Show Gist options
  • Save atomicules/257819 to your computer and use it in GitHub Desktop.
Save atomicules/257819 to your computer and use it in GitHub Desktop.
# testing mechanize in Ruby 1.9 based Shoes
# Assumes Mechanize is installed local to application
# Others might need this code:
=begin
Shoes.setup do
gem 'mechanize = 0.8.5' #mechanize 0.8.5 saves having to install nokogiri
end
=end
require 'rubygems'
require 'mechanize'
Shoes.app do
Agent = WWW::Mechanize.new
page = Agent.get('http://www.google.com/')
para page.body
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment