[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Newbie: HTTP, sessions and Ruby

John Doe

2/24/2005 8:52:00 PM

Hello all,

I've got a script written in Perl that I have to modify. I'm planning to
completely rewrite it using Ruby. The three main reasons to do this are:
1- My script has to be modified.
2- Perl is too "unclear" for me to find it pleasant to work with.
3- I want to give a try programming with Ruby. I've been charmed recently
with Python and now looking at Ruby doc it seems to be a pretty interesting
language.

What my script is doing:
1- It logs in Yahoo website using my user and password
2- It tooks some webpages there and do some process to extract information.
3- It updates a database with this information.

While looking at Ruby doc, I feel at ease to jump in with almost all the
work to be done except the Yahoo login and session management. Perl has a
great module to do this kind of work (LWP::UserAgent) but I suppose Ruby too
can acheive this. How? Is there any module more specific than Net::HTTP or
Net::HTTPS? If not, how am I suppose to use it? I mean, I get Yahoo login
page, extract all hidden parameter and "post" it with my username and
password, then... I don't understand the big picture to how should I manage
sessions in this case. Are cookies used?

How Yahoo knows if I'm logged or not and what do I have to do to manage
this? Any help or suggestion is welcome.

Thanks

Yannick