![]() |
|
Don't ask to ask, just ask | |
PerlMonks |
Re: Howto fill in username and password in a popup cookie with Perlby hgolden (Pilgrim) |
on Sep 22, 2006 at 14:44 UTC ( [id://574383]=note: print w/replies, xml ) | Need Help?? |
Hey I have a few thoughts. One is to enable cookies for Mech. That goes something like this: If that and swapping those two lines isn't working, I do have one idea. I had a site I was scraping recently (with their permission), and I was having trouble getting Mech to log in. What eventually worked with was this: I think part of the trick was making sure that I was sending that username/password combination to the login-script. Though for all I know, once I was calling the get on that url, it was the credentials statement that made it work (logging-in with Mech is pretty new to me). If you're having trouble locating the appropriate url for the login, I've had a lot of luck with Live HTTP Headers for Firefox, which basically tracks everything your browser does (when it's on), and has helped me mimic that with Mech. Good luck! Hays Update: Cookies may be on by default in Mech, but having the hard-copy lets you see what's there (if anything).
In Section
Seekers of Perl Wisdom
|
|