From: Don Armstrong Date: Mon, 21 Jan 2013 19:52:37 +0000 (-0800) Subject: update get_pdf to deal with the fact that links2 doesn't like leading http:// of... X-Git-Url: https://git.donarmstrong.com/?p=bin.git;a=commitdiff_plain;h=c212e703151b816dae271ba3ae5b811f6c8e2419 update get_pdf to deal with the fact that links2 doesn't like leading http:// of proxies --- diff --git a/get_pdf b/get_pdf index e562454..4a3f76b 100755 --- a/get_pdf +++ b/get_pdf @@ -153,7 +153,8 @@ if ($options{pmid}) { if ($@) { print STDERR "$@\n" if $DEBUG; system('links2', - exists $options{http_proxy}?('-http-proxy',$options{http_proxy}):(), + # links2 doesn't like the leading http:// of proxies for some reason + exists $options{http_proxy}?('-http-proxy',(map {s{http://}{}; $_} $options{http_proxy})):(), $url ) == 0 or next; rename('temp.pdf',"${pmid}.pdf") if -e 'temp.pdf';