From: Aaron Patterson Date: 2006-06-13T12:51:04+09:00 Subject: Re: Emulating Browser Session (like Curl)? On Tue, Jun 13, 2006 at 10:47:06AM +0900, Joe Ruby wrote: > I have a process that I want to emulate: > > - login (and remember cookies set) > - access pages that require being logged in > > With Curl, it's pretty easy: > > curl -c cookies -d "username=joe&password=12345" secret.com/login > curl -b cookies secret.com/dostuff > > I searched for Curl Ruby libraries and found: > > http://www.d1.dion.ne.jp/~matuyuki/ruby.html (0.0.2 alpha) > http://rox-ruby.sourceforge.net/cms.php/curl (pre-alpha - May 2003) > > Any other options, or libraries? Is open-uri capable of something > similar? Check out WWW::Mechanize: http://mechanize.rubyforge.org/ Or just install it: 'gem install mechanize' --Aaron