Python 易趣API项目兼容性XML输入
我正在使用eBay API和python ebaysdk模块。在发布新项目列表的AddFixedPriceItem请求中,我想使用item.ItemCompatibility(在使用我的生产密钥的eBayTors类别中),但由于某些原因,它不起作用 根据在线文档,这是所需的xml输入:Python 易趣API项目兼容性XML输入,python,xml,compatibility,ebay-api,Python,Xml,Compatibility,Ebay Api,我正在使用eBay API和python ebaysdk模块。在发布新项目列表的AddFixedPriceItem请求中,我想使用item.ItemCompatibility(在使用我的生产密钥的eBayTors类别中),但由于某些原因,它不起作用 根据在线文档,这是所需的xml输入: <ItemCompatibilityList> ItemCompatibilityListType <Compatibility> ItemCompatibilityType
<ItemCompatibilityList> ItemCompatibilityListType
<Compatibility> ItemCompatibilityType
<CompatibilityNotes> string </CompatibilityNotes>
<NameValueList> NameValueListType
<Name> string </Name>
<Value> string </Value>
<!-- ... more Value values allowed here ... -->
</NameValueList>
<!-- ... more NameValueList nodes allowed here ... -->
</Compatibility>
<!-- ... more Compatibility nodes allowed here ... -->
</ItemCompatibilityList>
该列表被发布并激活,所有其他信息都被正确发布,但目前还看不到兼容性。它根本就没有出现,我也没有得到任何错误的信息,告诉我我做错了什么
eBayMotors的一个兼容性项目是:
[Honda, Accord, 2002]
但我想要的是几个兼容性项目:
[Honda, Accord, 2002], [Honda, Accord, 2003], [Honda, Accord, 2004]
等等。三四天前,我实际上一次只让它作为一个兼容项工作。但我改变了我的代码,以适应多年的工作,结果在混合中的某个地方,我完全失去了工作代码的踪迹。自从我丢了它,我就一直在没完没了地工作,但我仍然不知道该怎么做。我不确定数据scructure是否设置错误,或者我是否遗漏了其他内容。任何帮助都将不胜感激。在上述代码中,字典键是重复的,这就是为什么系统将覆盖xml中的值 你应该把字典的清单寄给我
api_request = {
'Item': {
'Category': category,
'Title': title,
'ItemCompatibilityList': {
'Compatibility': {
{'CompatibilityNotes': 'Fits for all trims and engines.'},
{'NameValueList'[{'Name':'Year','Value':'2001'},
{'Name':'Make','Value':'Honda'},
{'Name':'Model','Value':'Accord'}]
},
}
}}}
这可能会对您有所帮助。在上述代码中,字典键是重复的,这就是为什么系统将覆盖xml中的值 你应该把字典的清单寄给我
api_request = {
'Item': {
'Category': category,
'Title': title,
'ItemCompatibilityList': {
'Compatibility': {
{'CompatibilityNotes': 'Fits for all trims and engines.'},
{'NameValueList'[{'Name':'Year','Value':'2001'},
{'Name':'Make','Value':'Honda'},
{'Name':'Model','Value':'Accord'}]
},
}
}}}
这可能会对你有所帮助。我刚才试过,我想我以前也试过几次。不管出于什么原因,它似乎仍然不起作用。你能写出从dict生成的xml格式吗?我刚才试过了,我想我以前也试过几次。不管出于什么原因,它似乎仍然不起作用。您能编写从dict生成的xml格式吗?