【发布时间】:2017-11-28 20:27:19
【问题描述】:
我正在使用Web of Science Python client,它适用于 suds,我几乎找不到任何有用的文档。我已经下载了超过 18k 的搜索结果(由于 API 的限制,这需要几个小时)并保存到文本文件中。现在我想解析它们。
要解析的示例文件:
(searchResults){
queryId = "462"
recordsFound = 1
recordsSearched = 65470148
records[] =
(liteRecord){
uid = "WOS:000353665400007"
title[] =
(labelValuesPair){
label = "Title"
value[] =
"A New Perspective on Instantiation",
},
doctype[] =
(labelValuesPair){
label = "Doctype"
value[] =
"Article",
},
source[] =
(labelValuesPair){
label = "Issue"
value[] =
"3",
},
(labelValuesPair){
label = "Pages"
value[] =
"448-463",
},
(labelValuesPair){
label = "Published.BiblioDate"
value[] =
"WIN",
},
(labelValuesPair){
label = "Published.BiblioYear"
value[] =
"2015",
},
(labelValuesPair){
label = "SourceTitle"
value[] =
"LIBRARY TRENDS",
},
(labelValuesPair){
label = "Volume"
value[] =
"63",
},
authors[] =
(labelValuesPair){
label = "Authors"
value[] =
"Garbacz, Pawel",
},
other[] =
(labelValuesPair){
label = "Identifier.Eissn"
value[] =
"1559-0682",
},
(labelValuesPair){
label = "Identifier.Ids"
value[] =
"CG9UK",
},
(labelValuesPair){
label = "Identifier.Issn"
value[] =
"0024-2594",
},
(labelValuesPair){
label = "ResearcherID.Disclaimer"
value[] =
"ResearcherID data provided by Clarivate Analytics",
},
},
}
- 如何将这些文件“解析”回 python?
- 如果很难做到 - 如何将 suds 对象保存为 XML/JSON?
【问题讨论】:
-
您找到解决方案了吗?我正在研究完全相同的问题..