如何使用Python将sharepoint list数据导入csv?

时间:2018-04-27 10:14:53

标签: python rest csv sharepoint

我正在使用以下python脚本将sharepoint列表导出到csv。

gender

它给了我这个错误: `SELECT` `tbl_warning`.`id`, `tbl_warning`.`staff_id`, `tbl_warning`.`note`, `tbl_warning`.`warning_date`,`tbl_employment`.`com_id` as `comid`, `tbl_staff`.`name`, `tbl_staff`.`gender` FROM `tbl_warning` JOIN `tbl_employment` ON `tbl_employment`.`staff_id` = `tbl_warning`.`staff_id` JOIN `tbl_staff` ON `tbl_staff`.`id` = `tbl_warning`.`staff_id` HAVING (SELECT `staff_id` FROM `tbl_warning` GROUP BY `staff_id` HAVING (count(staff_id) > 1));

如何使SSL证书验证失败。?

1 个答案:

答案 0 :(得分:0)

您需要在响应标头中添加身份验证:

`import requests
from requests_ntlm import HttpNtlmAuth

auth = HttpNtlmAuth('username','pass')

r = requests.get(
"https://sps16.com/sites/url/",
verify=False,
auth=auth,
headers={
'Accept': "application/json",
}

)
#print (r.json())
print (r.status_code)
print (r.headers)`