2 ms·
p.s. I found I had to use 'data.crossref.org' instead of 'dx.doi.org' when I scripted it (python + requests). Not sure why exactly (doi was redirecting to cross
by aaren 12y ago
p.s. I found I had to use 'data.crossref.org' instead of 'dx.doi.org' when I scripted it (python + requests). Not sure why exactly (doi was redirecting to crossref anyway).
- aaren 12y agoHow to do it in python in case anyone is wondering: import requests import json url = 'http://data.crossref.org/10.1017/S0022112061000019' headers = {'Accept': 'application/citeproc+json'} r = requests.get(url, headers=headers) meta = json.loads(r.content) # meta is a dictionary of metadata, e.g. meta['DOI']
- mmcnickle 12y agoNeat tip: You can just do: meta = r.json() and avoid the json import.