From: Don Armstrong Date: Mon, 28 Mar 2016 22:13:41 +0000 (-0700) Subject: use look_down instead of content_list() X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;ds=sidebyside;h=b89ff8cc8241f5e376f800257348e0a023aa7167;p=bin.git use look_down instead of content_list() --- diff --git a/jobs_to_org b/jobs_to_org index be827d0..81883d1 100755 --- a/jobs_to_org +++ b/jobs_to_org @@ -118,10 +118,9 @@ my %sites = higheredjobs => {url => 'https://www.higheredjobs.com/search/advanced_action.cfm?JobCat=113&JobCat=259&JobCat=99&JobCat=100&JobCat=108&JobCat=107&PosType=1&InstType=1&InstType=2&InstType=3&Keyword=&Remote=1&Remote=2&Region=&Submit=Search+Jobs', next_selector_tree => [class => 'js-click-submit', href => qr{advanced_action\.cfm}, - sub {my @c = $_[0]->content_list(); - return 0 unless @c; - return (defined $c[0]->attr('href') and - defined $c[0]->attr('src') =~ /active-right\.gif/); + sub {$_[0]->look_down(src => qr/active-right/) || + return 0; + return 1; }, ], job_selector => [url_regex => qr{^details.cfm\?JobCode=\d+},