From e757a4af9b5830b6f313daec9bf0824cdbd74570 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 24 Jun 2013 20:16:26 -0700 Subject: [PATCH] follow pmc links in addition to full text links --- get_pdf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get_pdf b/get_pdf index 2aa8416..2184c1c 100755 --- a/get_pdf +++ b/get_pdf @@ -126,7 +126,7 @@ if ($options{pmid}) { my @possible_links = $m->find_all_links(text_regex => qr/to\s*read/i); # try to find the other links push @possible_links, - grep {my $attr = $_->attrs(); exists $attr->{title} and $attr->{title} =~ qr/Full\s*Text/i} + grep {my $attr = $_->attrs(); exists $attr->{title} and $attr->{title} =~ qr/(?:Full\s*Text|PMC)/i} $m->links(); print STDERR map {"article link: ".$_->url_abs()."\n"} @possible_links if $DEBUG; die "No links" unless @possible_links; -- 2.39.5