0

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

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

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

我该怎么做,有人可以帮我解决这个问题吗?

4

1 回答 1

0
from magento.api import API
with API('url of magento instance',
                            'username',
                           'password') as api:

websites = api.call('ol_websites.list', [])
print "websites :",websites
于 2017-04-18T05:44:50.977 回答