如果我的查询返回结果,我会尝试提取一些额外的信息。
例如,在此查询中,notable_for 返回为“/music/musical_group”,我想合并另一个查询以提取有关“/music/musical_group”的一些信息,例如其“名称”
[{
"id": "/en/pearl_jam",
"mid":None,
"/common/topic/notable_for": [],
"name":[]
}]
但是如果它没有返回任何我不希望我的查询失败的东西。例如,对于下面的查询,它为字段“notable_for”返回一个空列表
[{
"id": "/music/musical_group",
"mid":None,
"/common/topic/notable_for": [],
"name":[]
}]
为此,我应该如何封装我的查询?