Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Mechanize / Hpricot / Scraping setup (See related posts)

   1  
   2  require 'rubygems'
   3  require 'cgi'
   4  require 'open-uri'
   5  require 'hpricot'
   6  require 'mechanize'
   7  
   8  agent = WWW::Mechanize.new
   9  doc = Hpricot(agent.get(the_url).parser.to_s)

You need to create an account or log in to post comments to this site.


Click here to browse all 5556 code snippets

Related Posts