Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.4k views
in Technique[技术] by (71.8m points)

Get the name attached to an ORCID ID through some API without Institution credentials

I have an ORCID number but my institution is not a "member". I'm editing Proceedings where each author has supplied eir ORCID numbers and I would like to check that these are correct. Instead of typing about 60 names into the www.orcid.org search interface, is there some way to do this through an API? (I can program in Perl, Python, PHP.)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Actually it was easier than I thought. All you need is to use the URL http://orcid.org/0000-0000-0000-0000 with the ORCID ID instead of the zeros, and you receive a file containing the name of the owner of that ID.

Here is Perl code to do it ($ORCID contains the ID for which we seek the owner):

system("wget -O tmp -q http://orcid.org/$ORCID");
open IN, "tmp";
binmode IN, ":utf8";
while (<IN>) {
if (m/<meta property="og:title" content="(.+?) ([0-9X-]{19})">/) { $name=$1; }
}
close IN;
print $name;

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...