This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USER_AGENT_ALIASES = ['Windows Mozilla', 'Mac Safari', 'Mac FireFox', 'Mac Mozilla', 'Linux Mozilla', 'Linux Firefox'] | |
agent = Mechanize.new do |mech| | |
mech.open_timeout = 10 | |
mech.read_timeout = 10 | |
mech.follow_meta_refresh = true | |
mech.keep_alive = true | |
mech.max_history = 1 | |
mech.user_agent_alias = USER_AGENT_ALIASES.sample | |
end | |
agent.set_proxy(proxy_ip, proxy_port, AppConfig.http_proxy.username, AppConfig.http_proxy.password) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An API wrapper for the MaxHire API. Based on the ActiveResource API. | |
# Designed to keep the horrors of SOAP away from decent code :) | |
# | |
# USAGE | |
# | |
# Creating a new object | |
# | |
# a = Maxhire::Person.new | |
# a.first = 'Eric' | |
# a.last = 'Anderson' |