From 013e9e38a4a7b5e8ebd042d1dab6801ef07449bc Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 24 Aug 2010 03:08:33 +0000 Subject: [PATCH] * fix wrong article being pulled from sd article --- get_pdf | 2 ++ 1 file changed, 2 insertions(+) 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, ); -- 2.39.5