WWW::Mechanize and authentication

------_=_NextPart_001_01C51B84.F8F93071
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

I am attempting to use WWW::Mechanize for the first time, and am having
some trouble with authentication. The page I'm trying to authenticate
to uses a pop-up prompt for user/pass, which seems to be what's causing
my problems. I've tried just about everything I can think of, but no
luck. I'm hoping for some help from the list...

Here's the gist of what my latest attempt was:

my $user =3D "user";
my $pass =3D "pass";
my $url =3D http://url.com/url.html;
my $mech =3D WWW::Mechanize->new();
$mech->credentials($url,$user,$pass);
$ret =3D $mech->get($url);

Unfortunately, this is not authenticating successfully. Part of the
hash returned to $ret contains "'_msg' =3D> 'Unauthorized'", as well as =
a
text message reponse indicating authentication failure.

How can I go about authenticating to a site like this? Any help would
be most appreciated.

Thanks.

Jason

------_=_NextPart_001_01C51B84.F8F93071--
Jason.Price [ Fr, 25 Februar 2005 22:57 ] [ ID #664674 ]

Re: WWW::Mechanize and authentication

Quoting Jason.Price [at] thomson.com:

> I am attempting to use WWW::Mechanize for the first time, and am having
> some trouble with authentication. The page I'm trying to authenticate
> to uses a pop-up prompt for user/pass, which seems to be what's causing
> my problems. I've tried just about everything I can think of, but no
> luck. I'm hoping for some help from the list...
>


is the popup actually a different url?




------------------------------------------------------------
This email was sent from Netspace Webmail: http://www.netspace.net.au
Richard Scott [ Sa, 26 Februar 2005 10:19 ] [ ID #665386 ]
Perl » perl.libwww » WWW::Mechanize and authentication

Vorheriges Thema: Help!! I'm stuck! - using LWP for single sign on purposes
Nächstes Thema: Return HTML (not text) between tags with HTML::Parser?