From: Peter Szinek Date: 2007-03-30T04:03:36+09:00 Subject: Re: Code to login into any account with login and passport. Sachin Gadkar wrote: > Hi Ruby_pals, > Say, I have login and password for an account. > Is it possible to get logged into it through a ruby code. One way is to use scRUBYt!: ========================================================== rubyforge_data = Scrubyt::Extractor.define do fetch 'http://rubyforge.org/' click_link 'Log In' fill_textfield 'form_loginname', '*login_here*' fill_textfield 'form_pw', '*pass_here*' submit 0 stuff 'My Personal Page' end ========================================================== Or you can use WWW::Mechanize (scRUBYt! is also built on Mechanize) to do the same thing. If you would like to also scrape something there, I would suggest scRUBYt!, otherwise Mechanize is the way to go. Cheers, Peter _ http://www.rubyrailways.com :: Ruby and Web2.0 blog http://scrubyt.org :: Ruby web scraping framework http://rubykitchensink.ca/ :: The indexed archive of all things Ruby