Created
October 30, 2012 23:47
-
-
Save emergent/3983870 to your computer and use it in GitHub Desktop.
Revisions
-
emergent created this gist
Oct 30, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ require 'rubygems' require 'mechanize' agent = Mechanize.new agent.set_proxy('proxy.example.com', 80, 'username', 'password') agent.add_auth('http://hoge.com','b_username','b_password') agent.user_agent_alias = "Windows Mozilla" res = agent.get('http://hoge.com/some/page') puts res.body