Bash or python -- scripting the doi pdf grab

import cookielib, urllib2 >>> cj=cookielib.CookieJar() >>> opener=urllib2.builde_opener(urllib2.HTTPCookieProcessor(cj)) >>> r=opener.open(“http://dx.doi.org/10.1063/1.2709626") >>> l=r.readlines() >>> print(l)

janus$ curl -A 'Mozilla/5.0' --include --location -c lal.ck -o dx.html 'http://dx.doi.org/10.1063/1.2709626'
janus$ grep -i servlet?filetype=pdf  dx.html