};
if ($@) {
print STDERR "$@\n" if $DEBUG;
- system('links',
+ system('links2',
exists $options{http_proxy}?('-http-proxy',$options{http_proxy}):(),
$url
) == 0 or next;
print STDERR $m->content() if $DEBUG;
}
my @possible_links;
+ # this is to prioritize the real link at science direct
+ push @possible_links, grep { $_->url_abs() !~ /_orig=article/} $m->find_all_links(text_regex => qr/PDF/i);
push @possible_links, $m->find_all_links(tag_regex => qr/meta/,
url_regex => qr/(reprint|\.pdf)/i,
);