[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Code to login into any account with login and passport.

Peter Szinek

3/29/2007 7:04:00 PM

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...
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.rubyra... :: Ruby and Web2.0 blog
http://s... :: Ruby web scraping framework
http://rubykitch... :: The indexed archive of all things Ruby