Python-Suds 连接 Sharepoint 时出现 403 Forbidden 错误
我正在使用Python的SUDs库来访问Sharepoint的网络服务。
我按照Suds网站上的标准文档进行了操作。
但是在过去的两天里,无论我访问哪个服务,远程服务总是返回403禁止访问的错误。
我使用的是Suds 0.4版本,它内置了对Python NTLM的支持。
如果有人知道这是什么问题,请告诉我。
from suds import transport
from suds import client
from suds.transport.https import WindowsHttpAuthenticated
import logging
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.client').setLevel(logging.DEBUG)
ntlm = WindowsHttpAuthenticated(username='USER_ID', password='PASS')
c_lists = client.Client(url='https://SHAREPOINT_URL/_vti_bin/Lists.asmx?WSDL', transport=ntlm)
#c_lists = client.Client(url='https://SHAREPOINT_URL/_vti_bin/spsearch.asmx?WSDL')
#print c_lists
listsCollection = c_lists.service.GetListCollection()