I've written this script to run a Careerjet search and output the results to a text file. The code is taken almost verbatim from the example on the CPAN doc, though I cant get it to output more than the default pagesize of 20...?
use strict;
use WebService::Careerjet;
# Open output file
open(OUT, '>', "jobs.txt") or die $!;
# Create Perl interface to API
my $careerjet = WebService::Careerjet->new('en_US');
# Perform a search
my $result = $careerjet->search( {
'keywords' => 'weather ri
+sk manager',
'location' => 'us',
'pagesize' => '100',
} );
# Go through results
if ( $result->{'type'} eq 'JOBS') {
print "Found ".$result->{'hits'}." jobs\n";
my $jobs = $result->{'jobs'};
foreach my $j(@$jobs) {
print OUT "$j->{'url'}~$j->{'title'}~$j->{'company'}~$j->{'sal
+ary'}~$j->{'date'}~$j->{'description'}~$j->{'site'}~$j->{'locations'}
+";
print OUT "\n";
};
}
close (OUT);
260 jobs are found, but only the first 20 are written to my text file. Any ideas? Thanks
20100422 Janitored by Corion: Restored content
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.