14 lines
425 B
Python
14 lines
425 B
Python
|
|
import requests
|
||
|
|
|
||
|
|
|
||
|
|
def downloadexcel(headers,data,url):
|
||
|
|
response = requests.post(url, headers=headers, data=data)
|
||
|
|
if response.status_code == 200:
|
||
|
|
with open("active_defence_event_log"+".xlsx", "wb") as code:
|
||
|
|
code.write(response.content)
|
||
|
|
return 200;
|
||
|
|
else:
|
||
|
|
print('导出失败'+response.content)
|
||
|
|
return 500;
|
||
|
|
if __name__ == '__main__':
|
||
|
|
downloadexcel(header,data,url)
|