我打电话给哈巴内罗API,它是CrossRef的前端。使用此代码:
import json
from habanero import cn
x = cn.content_negotiation(ids="10.1051/0004-6361/201628812",
format = "text", style = 'elsevier-harvard')
print(u'{0}'.format(x))
print(json.dumps(x, indent=4, sort_keys=True))我得到以下输出(强调我的输出):
Jofr,P.,Gilmore,G.,Elsworth,Y.,Hekker,S.,2016。一个准确和自我一致的化学丰度目录的远地点/开普勒样本。天文学和天体物理学594,A43。
“霍金斯,K.,马塞隆,T.,Jofr\u00c3\u00a9,P.,Gilmore,G.,Elsworth,Y.,Hekker,S.,2016。远地点/Keplersample的精确和自洽化学丰度目录。天文学和天体物理学594,A43.\n”
第三个作者的名字应该是Jofré,所以我想最终的角色应该是\uc3a9。从JSON转储看来,它正在发送\u00c3u00a9。我在请求或解码方面做错了什么吗?
发布于 2018-05-25 00:54:13
固定在git回购。h/t @sckott
https://stackoverflow.com/questions/50477475
复制相似问题