- 博客(6)
- 收藏
- 关注
原创 接口获取数据写入json文件
#-*-coding:utf-8-*-import openpyxlimport jsonimport requestsdef readExcel(): wb=openpyxl.load_workbook(r'D:\ruanjian\learn\os\testcase\sku_3c_7_1105.xlsx') sheet=wb['sku_3c_7_1105(1)'] max_row = sheet.max_row max_col = sheet.max_column
2020-11-19 14:55:23
440
原创 把excel数据写入到json文件
把excel数据写入到json文件#-*-coding:utf-8-*-import openpyxlimport jsondef ExcelJson(): wb=openpyxl.load_workbook(r'D:\zhiang\项目\售前指标\os.xlsx') sheet=wb['sheet1'] sku_id=[] sku_name=[] max_row=sheet.max_row for i in range(2,max_row+1):#
2020-11-19 11:14:12
482
原创 requests发送post请求form-data格式
def main():xxxx url="要访问的url" headers={ 'Accept':'application/json, text/plain, */*', 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)xxxx Chrome/86.0.4240.111 Safari/537.36', 'R
2020-11-10 18:33:08
3402
原创 requests发送get请求
# -*- coding:utf-8 -*-import requestsimport jsonurl="https://xxx/comment/productPageComments.action?callback=fetchJSON_comment98&productId=100005769525&score=0&sortType=5&page=1&pageSize=10&isShadowSku=0&rid=0&fold=1"hea
2020-11-10 18:24:30
256
原创 python解析json文件
import jsonimport xlwtdef loadFont():f = open(“2020110386440427.json”, encoding=‘utf-8’)setting = json.load(f)family = setting[‘hits’][‘hits’] #[0][’_source’][‘cust_ser_acct_no’]pin_list=[]shop_supplier_id=[]shop_supplier_name=[]order_d7_sale_qtty
2020-11-10 18:20:41
146
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人