标签:info int inf img 模拟 seconds 输出 logs htm
ui界面:
实现代码:
def export(self,host):
‘‘‘导出课时券记录‘‘‘
#测试接口
url=‘https://‘+host+r‘/ticket-record/export?timespan=1568010189362‘
#请求头
heard=self.public()
#发送请求
r=self.codemao.request2.get(url,headers=heard)
# 输出请求时长
print ‘请求时长:‘,r.elapsed.total_seconds()
print r.content
fp = open("yoyo.xls", "wb")
fp.write(r.content)
fp.close()
参考:https://www.cnblogs.com/guo2733/p/10542736.html
标签:info int inf img 模拟 seconds 输出 logs htm
原文地址:https://www.cnblogs.com/kaibindirver/p/11497204.html