Many Mechanize Examples
See several great mechanize examples.
Join the DZone community and get the full member experience.
Join For Free
require 'rubygems'
require 'mechanize'
agent = WWW::Mechanize.new
agent.set_proxy('localhost', '8000')
agent.user_agent = 'Individueller User-Agent'
agent.user_agent_alias = 'Linux Mozilla'
agent.open_timeout = 3
agent.read_timeout = 4
agent.keep_alive = false
agent.max_history = 0 # reduce memory if you make lots of requests
Opinions expressed by DZone contributors are their own.
Comments