Plankton has asked for the wisdom of the Perl Monks concerning the following question:
This is all I get ...#!/usr/bin/perl -w use strict; ... my $debug_level = 1; my $ACTIONURL="http://seeker.dice.com/jobsearch/servlet/JobSearch"; getopts( "U:d:h" ); if ( $opt_h ) { &usage(); exit 0; } if ( $opt_d ) { $debug_level = $opt_d; } my $browser; my $rc = do_LWPsetup( \$browser ); if ($rc==0) { die __FILE__ . "[" . __LINE__ . "] Failure: do_LWPStuff failed\n"; } do_getSearchResults ( $browser ); sub do_getSearchResults { my $browser = shift; my $resp = $browser->post("$ACTIONURL", [ 'op' => '1000', 'METRO_SEARCH' => '1', 'rel_code' => '1102', 'metro_id' => '1', 'secret' => '1', 'FREE_TEXT' => 'Perl', 'SKILLS' => "", 'RADIO' => 'AND', 'RADIO' => 'OR', 'RADIO' => 'BOOL', 'AREA_CODES' => '408', 'TAXTERM' => 'ALL', 'SORT_TYPE' => "", 'REQ_TRAVEL' => '1', 'TELECOMMUTE' => "", 'SORTSPEC' => '0', 'DAYSBACK' => '30', 'NUM_PER_PAGE' => '50', 'DETAILED_RESULTS' => '1', 'HOTRESULTS' => "" # 'Submit' => 'HOTRESULTS' ], 'Content_Type' => 'form-data' ); if (do_errorcheck($resp,"Search")) { return 0; } return 1; } ...
$ getdice.pl -d2 Begin HTML: End HTML
| Plankton: 1% Evil, 99% Hot Gas. |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP script for Dice metro search form
by b10m (Vicar) on Jan 08, 2004 at 20:58 UTC | |
|
Re: LWP script for Dice metro search form
by Anonymous Monk on Jan 08, 2004 at 20:59 UTC | |
by bassplayer (Monsignor) on Jan 08, 2004 at 21:21 UTC |