Re: 2 Qs: archives & radio buttons
Mike McClain <[email protected]> Sat, 2 Jul 2011 22:10:59 -0700
| Newsgroups | gmane.comp.lang.perl.modules.lwp |
|---|---|
| Message-ID | <20110703051059.GB18987@playground> |
On Wed, Jun 22, 2011 at 02:20:17PM -0700, Mike McClain wrote:
<snip>
It's been a couple of weeks and noone has responded and
since I've found an answer, I'll post it.
This works: also see libwww_6526
### now on 'My Searches' page, radio buttons select which search
my $my_searches_page = $mech->uri(); # to return to
my $form = $mech->current_form();
# 'rdoMySearch' was pulled from the source of the page I was querying
my $radio = $form->find_input( 'rdoMySearch', 'radio' );
my @radios = $radio->possible_values;
for my $r ( @radios )
{ # select a button and click search
$mech->set_visible( [ radio => $r ] ) ;
# <INPUT TYPE="submit" NAME="Submit" VALUE="Search Now" ...>
# 3 submit buttons differing only in value so click() not appropriate
$response = $mech->click_button( value => "Search Now" );
die qq/mech->click_button( value => "Search Now" ); returned undef/
unless(defined $response);
# do whatever with the returned page,
# in my case it was pull out the job listings
# back to 'My Searches' page, where the radio buttons are
#$mech->back(); not working for me, backs up too far
$response = $mech->get( $my_searches_page );
die qq/$mech->get( $my_searches_page ); failed/
unless( $mech->success() );
sleep 1; # CalJobs seems to need time to think
}
I also asked about sites on the web where I could search the libwww archives.
After DLing 7500 messages from 1999 to present to my own computer to search
I found these archives on the web:
http://ftp.ics.uci.edu/pub/websoft/libwww-perl/archive/
contains messages from 1994-2001 but is not searchable.
http://www.xray.mpe.mpg.de/mailing-lists/libwww-perl/
doesn't go back as far but is searchable.
Hope this helps somebody.
Mike
--
Satisfied user of Linux since 1997.
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org