软件编程 --- 发http包
# 时间 12:08 # "expires_in": 171205, import requests import json from datetime import datetime import time url = "https://jywgappthw.chinatowercom.cn:9000/workorder/bill/getBillList/" headers = { "Authorization": "Bearer 8758805f-cf24-4e43-ad8c-a661e76c206f", "User-Agent": "Mozilla/5.0 (Linux; Android 11; 2112123AC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.131 Mobile Safari/537.36 uni-app Html5Plus/1.0 (Immersed/24.0)", "Content-Type": "application/json", } payload = { "userId": "91c7750eadc144948ba558fc367c9c8d", "roleId": "0100070", "billType": "ACCEPT", "pageNumber": 1, "pageSize": 10, "billStatus": "", "areaId": "", "businessType": "", "beginTimeType": "", "cityId": "", "provId": "", "stationCode": "", "stationName": "", "deviceName": "", "deviceCode": "", "billSn": "" } while True: # Making the POST request response = requests.post(url, headers=headers, json=payload) # Writing response to a file timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") with open("C://1.txt", "w") as file: file.write(f"Response Time: {timestamp}\n\n") file.write(f"Response Headers:\n{json.dumps(dict(response.headers), indent=2)}\n\n") file.write(f"Response Body:\n{json.dumps(response.json(), indent=2)}") # Introduce a delay (1 minute in this example) time.sleep(60)
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 使用C#创建一个MCP客户端
· ollama系列1:轻松3步本地部署deepseek,普通电脑可用
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 按钮权限的设计及实现
2021-11-24 rog游戏手机2 解bl锁 刷机