Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LWP::Agent vs. WWW::Mechanize

Status
Not open for further replies.

jcdento

Programmer
Jun 13, 2008
1
US
Hello, I am having some trouble running a secure login script. I need mechanize for its link following capabilities, yet i cannot get mech to login using the identical commands as the version of the script using LWP::Agent.

I am using:
Code:
$response = $agent->get($url);
my $form = HTML::Form->parse($response->{_content}, $response->base());
$form->param("username", "---------");
$form->param("password", "---------");
$response = $agent->request($form->click);
then when i print response content, when $agent is of LWP::Agent i am logged in, but with I am redirected to the login screen.

This is EXTREMELY frustrating since this isnt even supposed to be what I am doing. any help would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top