WWW::Mechanize and authentication

WWW::Mechanize and authentication

am 25.02.2005 22:57:17 von Jason.Price

------_=_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...
=20
Here's the gist of what my latest attempt was:
=20
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);=20
$ret =3D $mech->get($url);
=20
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.
=20
How can I go about authenticating to a site like this? Any help would
be most appreciated.
=20
Thanks.
=20
Jason

------_=_NextPart_001_01C51B84.F8F93071--

Re: WWW::Mechanize and authentication

am 26.02.2005 10:19:56 von Richard Scott

Quoting Jason.Price@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