Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re^5: Loging into a website using javascript for login

by Kanji (Parson)
on Sep 27, 2004 at 20:30 UTC ( #394339=note: print w/replies, xml ) Need Help??

in reply to Re^4: Loging into a website using javascript for login
in thread Loging into a website using javascript for login

Actually, there's no need to write your own parser to get at that URL: LWP::UserAgent, which WWW::Mechanize is an extension of, does it for you!

# UNTESTED; USE AT YOUR OWN PERIL :-) my $response = $mech->submit_form( form_name => 'loginForm', # ... ); # Follow HTTP or META refreshes. if (my $url = $response->header('Refresh')) { $url =~ s/^\d+;url=//i; $mech->get($url); }

There may even be way to get LWP::UA or WWW::Mech to automatically follow along, but I haven't delved into the documentation to see although I did stumble across a WWW::Mechanize wishlist item that you may want to keep your eye on.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://394339]
[Corion]: 1nickt: No, I'm using it with Windows 10, but with the 4k display, yes. It's a very nice build IMO, and relatively sturdy. Also, it got 8 or 9 on the ifixit repair scale, which I consider good
[Corion]: ... especially as I expect to have to replace the battery set in two or three years' time
[1nickt]: Nice. So happy that Dells are still user-repairable. Unusual these days.
[1nickt]: I will certainly not be buying any more Macs.
[Corion]: 1nickt: Yeah, or at least, I hopoe so ;)

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2017-03-27 13:15 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.