摘要: 读写excel工具类 openpyxl只支持.xlsx这种格式1.打开文档load_workbook() 2.定位表单 3.定位单元格 4.表单最大行/最大列数据从excel里面拿出来是什么类型:整数是int,其他都是str from openpyxl import load_workbook cl 阅读全文
posted @ 2022-07-08 14:35 Lucky-qq 阅读(52) 评论(0) 推荐(0) 编辑
摘要: python-反射机制 class GetData: Cookie = None # 设置Cookie的值 setattr(GetData, 'Cookie', '123456') # 打印设置后Cookie的值 print(GetData().Cookie) # 获取目前Cookie的值 prin 阅读全文
posted @ 2022-07-08 14:34 Lucky-qq 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 封装http请求工具类 1.代码一 import requests class HttpRequest: """封装http接口请求""" def http_request(self,method,url,data=None,header=None): if method.lower() == 'g 阅读全文
posted @ 2022-07-08 10:52 Lucky-qq 阅读(261) 评论(0) 推荐(0) 编辑
摘要: python实现http请求-requests模块 import requests get请求 url = 'http://ip:port/接口地址' res = requests.get(url,cookies=None) 返回一个消息实体 res.headers 响应头 res.status_c 阅读全文
posted @ 2022-07-08 09:58 Lucky-qq 阅读(531) 评论(0) 推荐(0) 编辑