#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #pip install pandas #pip install openpyxl # # # #http://192.168.145.37:8090/nationExchangeLogController/uploadlogDetailList.do?order=asc&limit=130000&offset=0&startTime=2021-01-01&endTime=2021-04-30&agId=6718&level=20&levelType=1&serviceType=1&reportBillType=3&uploadStaus=0&headNo=&failReason=&_=1669099702149 # # # import json import time import pandas import datetime #db import pymssql #with open('fuyang.txt', 'rb',encoding="utf-8") as f: with open('do.json', 'r') as f: #with open('xcv.txt', 'rb') as f: try: data = json.load(f) #print(data) #print(type(data)) #print(len(data)) #for i in int(range(data)): # print(data[i]) for i in data: print(i) print(i.keys()) print(i['NetworkSettings']) print(type(i['NetworkSettings'])) print(i['NetworkSettings'].keys()) print(i['NetworkSettings']['Networks']) #print(i['Args']) #print(type(i['Args'])) #for ix in i['Args']: # print(ix) #print(i['auditTime']) time.sleep(6) except Exception as err: print(err) ''' print(dataOutput.keys()) #print(len(dataOutput["vaccNum"])) for i in dataOutput.keys(): #print(i) #print(len(dataOutput(str(i)))) print(len(dataOutputs[i])) #print(dataOutput) print("正在写入Excel") currentTime = datetime.datetime.now() dataForm = pandas.DataFrame(dataOutput) dataForm.to_excel("结果合肥2022" + currentTime.strftime("%Y%m%d") + '.xlsx') print("写入完成") '''