Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
20 lines (15 sloc) 0.35 kB
require 'rubygems'
require 'nokogiri'
dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
require File.join(dir, 'httparty')
require 'pp'
class HtmlParserIncluded < HTTParty::Parser
def html
Nokogiri::HTML(body)
end
end
class Page
include HTTParty
parser HtmlParserIncluded
end
pp Page.get('http://www.google.com')
Jump to Line
Something went wrong with that request. Please try again.