M
michal.shmueli
i'm trying to use agent to retrieve data from some websites. the
website is using POST method. so i tried to follow some examples i
found on the web...
Eventually, i did the follow, but i'm getting error that says that it
couldn't fetch any data....
any idea?
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
my $browser = LWP::UserAgent->new;
$browser->env_proxy;
my $url = 'http://www.carprices.com/cgi-bin/n_page3.cgi';
my $response = $browser->post( $url,
[ "vehicle_type" =>"new,used",
"conf_id" =>"carprices",
"onpage" =>"1",
"frompage" =>"basicsearch",
"bodystyle_buff" =>
"convertible,coupe,hatchback,pickup,sedan,suv,van,wagon",
"price_min_buff" => "1050",
"price_max_buff" => "149990",
"year_min_buff" => "1986",
"year_max_buff" => "2005" ]
);
thanks a lot,
Michal
website is using POST method. so i tried to follow some examples i
found on the web...
Eventually, i did the follow, but i'm getting error that says that it
couldn't fetch any data....
any idea?
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
my $browser = LWP::UserAgent->new;
$browser->env_proxy;
my $url = 'http://www.carprices.com/cgi-bin/n_page3.cgi';
my $response = $browser->post( $url,
[ "vehicle_type" =>"new,used",
"conf_id" =>"carprices",
"onpage" =>"1",
"frompage" =>"basicsearch",
"bodystyle_buff" =>
"convertible,coupe,hatchback,pickup,sedan,suv,van,wagon",
"price_min_buff" => "1050",
"price_max_buff" => "149990",
"year_min_buff" => "1986",
"year_max_buff" => "2005" ]
);
thanks a lot,
Michal