From: Don Armstrong Date: Tue, 24 Aug 2010 03:08:33 +0000 (+0000) Subject: * fix wrong article being pulled from sd article X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=013e9e38a4a7b5e8ebd042d1dab6801ef07449bc;p=bin.git * fix wrong article being pulled from sd article --- diff --git a/get_pdf b/get_pdf index 3768e52..8187738 100755 --- a/get_pdf +++ b/get_pdf @@ -178,6 +178,8 @@ sub find_pdf_link { 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, );