dannite
Programmer
- Jun 12, 2008
- 2
I need to log in to a secure site and perform some automated searching. I have the secure login working fine, but the search is returning so results with search strings that yield results on a browser.
I assume that something I am doing is making it impossible for the Javascript that runs the page to access its database.
Any help would be awesome.
#!c:\\perl\\bin
use strict;
use warnings;
use use HTTP::Cookies;
#use LWP:
ebug qw(+);
my $outfile = "out.htm";
my $url = "my $username = "bdaniel2";
my $password = "dannite3";
my $mech = $mech->cookie_jar(HTTP::Cookies->new());
$mech->get($url);
$mech->form_name('Login');
$mech->field(USER => $username);
$mech->field(PASSWORD => $password);
$mech->click();
$mech->form_name('personxref');
$mech->field(inpSearchPattern => "Daniel");
$mech->field(inpFirstName => "Bruce");
$mech->click();
my $output_page = $mech->content();
open(OUTFILE, ">$outfile");
print OUTFILE "$output_page";
close(OUTFILE);
I assume that something I am doing is making it impossible for the Javascript that runs the page to access its database.
Any help would be awesome.
#!c:\\perl\\bin
use strict;
use warnings;
use use HTTP::Cookies;
#use LWP:
my $outfile = "out.htm";
my $url = "my $username = "bdaniel2";
my $password = "dannite3";
my $mech = $mech->cookie_jar(HTTP::Cookies->new());
$mech->get($url);
$mech->form_name('Login');
$mech->field(USER => $username);
$mech->field(PASSWORD => $password);
$mech->click();
$mech->form_name('personxref');
$mech->field(inpSearchPattern => "Daniel");
$mech->field(inpFirstName => "Bruce");
$mech->click();
my $output_page = $mech->content();
open(OUTFILE, ">$outfile");
print OUTFILE "$output_page";
close(OUTFILE);