From: Don Armstrong Date: Tue, 25 Jun 2013 03:16:26 +0000 (-0700) Subject: follow pmc links in addition to full text links X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e757a4af9b5830b6f313daec9bf0824cdbd74570;p=bin.git follow pmc links in addition to full text links --- 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;