我已经从 Elsevier 制作了一个 API 密钥,我正在使用 Python 访问 Scopus API 以通过以下方式获取英国物理论文的记录:
import requests
import json
from myscopus import MYAPIKEY
URL = "http://api.elsevier.com/content/search/scopus?query=\
"AFFIL%28university+AND+physics+AND+united+kingdom%29+\
"AND+SUBJAREA%28PHYS%29&field=affiliation"
header = {'Accept' : 'application/json',
'X-ELS-APIKey' : MYAPIKEY}
resp = requests.get(URL, headers=header)
results = resp.json()
print([[str(r['affiliation'])] for r in results['search-results']["entry"]])
我只想要完全隶属于英国的结果(即没有作者可以来自其他地方)。如果我在 Scopus 上手动运行搜索,我可以通过优化结果来做到这一点,排除除英国以外的所有其他国家/地区的结果。有没有一种方法可以在没有大量代码的情况下在 Python 中做到这一点?