Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Stay logged in between requests with WWW::Mechanize

by sasdrtx (Friar)
on Nov 14, 2008 at 03:48 UTC ( [id://723552]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Stay logged in between requests with WWW::Mechanize
in thread Stay logged in between requests with WWW::Mechanize

I'm not an expert at this, but why would a browser, or WWW:Mechanize write a session cookie to a file? It's only supposed to be around as long as the browser is running, so keeping it in memory only makes sense.


sas
  • Comment on Re^3: Stay logged in between requests with WWW::Mechanize

Replies are listed 'Best First'.
Re^4: Stay logged in between requests with WWW::Mechanize
by Cody Pendant (Prior) on Nov 14, 2008 at 05:33 UTC
    That's logical, but I want it to DWIW!

    I guess the logical thing is that I would keep my script running in an endless loop, i.e. instead of a cron job running every five minutes, I run my script with while(1) and a five-minute sleep()?

    I don't love that idea.



    Nobody says perl looks like line-noise any more
    kids today don't know what line-noise IS ...
      I don't love that idea.

      Have you tried what the Anonymous Monk suggested?  from HTTP::Cookies:

      ignore_discard: save even cookies that are requested to be discar +ded (bool)

      Sounds like made for exactly that purpose...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-16 23:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found