This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dongxiaoyan-tsg-autotest/01-TestCase/tsg_bfapi/active_defence_event_log/downloadexcel.py

14 lines
425 B
Python
Raw Normal View History

2020-04-29 19:39:52 +08:00
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)