我需要使用没有WSDL的python 3.5连接到ISPConfig 3并从中获取数据。我没有找到任何有用的东西,也许有人已经尝试过或者有任何建议,提示或示例代码?有一些PHP的例子,但没有什么新鲜的python。
某些代码
目前我有这个,但我没有想法,如果它甚至是有用的东西,但至少有些东西。
from django.core.management.base import BaseCommand
from pysimplesoap.client import SoapClient
class Command(BaseCommand):
def handle(self, *args, **options):
username = 'usr'
password = 'usrpswd'
url = 'https://link/remote/index.php'
uri = 'https://link/remote'
client = SoapClient(
location=url,
trace=True,
http_headers={'Authorization': 'Basic %s:%s' % (username, password)}
)
其他来源
此外,我找到了此ipsconfig-json-wrapper,在将文件放入文件夹后转到http://{domain}/remote/json.php?method=login&username=fubar&password=boobaz&callback=JSON_CALLBACK
我得到typeof JSONP === 'function' && JSONP({"success":true,"response":"**************************"});
也许现在有人可以帮助制作GET请求并获取一些数据或者至少解释下一步该做什么?