我如何使用python代码从magento获取网站列表



在这个问题中,使用python从magento获取网站列表。
在python代码中,我使用了xmlrpc,

我已经尝试过了,但是发生了错误,我的代码写在下面

result1=api.call('ol_websites.info',[1,])
print result1

我是怎么做到的,任何人都可以帮我解决这个问题?

from magento.api import API
with API('url of magento instance',
                            'username',
                           'password') as api:
websites = api.call('ol_websites.list', [])
print "websites :",websites

最新更新