Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: WWW::Mechanize and Cookies

by fokat (Deacon)
on May 02, 2005 at 03:59 UTC ( #453121=note: print w/ replies, xml ) Need Help??


in reply to Re: WWW::Mechanize and Cookies
in thread WWW::Mechanize and Cookies

NOTE: I haven't used cookies with WWW::Mechanize, but I've used them with LWP. So take this post with a grain of salt.

I have used them and it works exactly as dorko's answer explain.

Best regards

-lem, but some call me fokat


Comment on Re^2: WWW::Mechanize and Cookies
Re^3: WWW::Mechanize and Cookies
by Cody Pendant (Prior) on May 02, 2005 at 06:44 UTC
    I use cookies with WWW::Mechanize, but not only saving cookies for the session, saving cookies for later sessions as set by the site's "remember me on this computer"* checkbox.

    my $browser = WWW::Mechanize->new( cookie_jar => { file => "$ENV{HOME}/.cookies.txt", autosave => 1 } );

    That script logged into the NY Times two years ago and has stayed logged in ever since.

    * It should be "remember me on this computer with this browser" of course, but what the hell...



    ($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
    =~y~b-v~a-z~s; print

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://453121]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2014-09-02 13:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (22 votes), past polls