PerlSufi has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I have been at this for a little while, and I am stuck on one part. I am trying to crawl a page to access a csv file. Here is my script (or part of it):
The problem I am having right now is that I am not clicking the "Search" button at the last post. Firebug shows it has the value 'Search'. I think I need help understanding how to do this. I also have to click one last button on the page proceeding that, but I'll cross that bridge when I get there. Any insight is greatly appreciated.Thanks!
PS-I should add that I cannot use a module that utilizes a browser or javascript plugin.
my $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 1 }); $ua->agent('Mozilla/5.0'); $ua->cookie_jar({}); my $response = $ua->get('firstpage.com'); my $response2 = $ua->get('secondpage.com'); (etc) ###This section is where I am having trouble: my $post = $ua->post('https://www.foo.com/downloadAcsReportSearch.html +', "Search");
The problem I am having right now is that I am not clicking the "Search" button at the last post. Firebug shows it has the value 'Search'. I think I need help understanding how to do this. I also have to click one last button on the page proceeding that, but I'll cross that bridge when I get there. Any insight is greatly appreciated.Thanks!
PS-I should add that I cannot use a module that utilizes a browser or javascript plugin.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: LWP posting
by aitap (Curate) on May 14, 2013 at 19:14 UTC | |
Re: LWP posting
by SnackySmorez (Initiate) on May 14, 2013 at 19:28 UTC | |
by PerlSufi (Friar) on May 14, 2013 at 19:59 UTC | |
by Anonymous Monk on May 14, 2013 at 20:20 UTC | |
by PerlSufi (Friar) on May 14, 2013 at 20:40 UTC | |
by PerlSufi (Friar) on May 14, 2013 at 21:27 UTC | |
by SnackySmorez (Initiate) on May 15, 2013 at 22:23 UTC | |
Re: LWP posting
by PerlSufi (Friar) on May 15, 2013 at 00:35 UTC |
Back to
Seekers of Perl Wisdom