From 57714ddd21507bef6b188da9d8a1a7fe9f206036 Mon Sep 17 00:00:00 2001 From: wangsiyuan <2392948297@qq.com> Date: Thu, 28 Mar 2024 10:04:05 +0800 Subject: [PATCH] Update huaweitest.py --- huaweitest.py | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/huaweitest.py b/huaweitest.py index 55463f0..4fba0d4 100644 --- a/huaweitest.py +++ b/huaweitest.py @@ -1,4 +1,4 @@ -from fastapi import FastAPI, Query, Request,HTTPException +from fastapi import FastAPI, Query, Request, HTTPException from datetime import datetime import random @@ -25,26 +25,12 @@ async def getscriparam(request: Request): formatted_now = now.strftime("%Y-%m-%d %H:%M:%S") print(f"请求IP地址: {request.client.host},请求时间{formatted_now},请求路径: /script/getscriparam") data = { - "interaction": { - "from": 20, - "to": 30 - }, - "bounceRate": { - "from": 0.3, - "to": 0.4 - }, - "ctr": { - "from": 0.03, - "to": 0.05 - }, - "pagesToViewPerSession": { - "from": 2, - "to": 3 - }, - "sessionsPerUser": { - "from": 2, - "to": 3 - } + "interaction": {"from": 20, "to": 30}, + "bounceRate": {"from": 0.3, "to": 0.4}, + "pagesToViewPerSession": {"from": 2, "to": 3}, + "sessionsPerUser": {"from": 2, "to": 3}, + "ctr": {"from": 0.03, "to": 0.05}, + "shouldDoClick": "true" } return data