in reply to unable to post to forum
This is a partial example of what I did to pull names and addresses from yellowpages.com:
use WWW::Mechanize; my ($name, $city, $state); my $url = 'http://www.yellowpages.com/Index.aspx'; my $mech = WWW::Mechanize->new(autocheck => 1); $mech->get( $url ); $mech->form_name("__aspnetForm"); $mech->field("Mainhomectrl2:BasicForm1:businessname", $name); $mech->field("Mainhomectrl2:BasicForm1:city", $city); $mech->field("Mainhomectrl2:BasicForm1:state", $state); $mech->click("Mainhomectrl2:BasicForm1:searchbtn");
I think you need to add $agent->form_name("post") to your code. I just tried it and it didn't throw an error when I added that to your code.
HTH!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |