完成 Ruff 全量清理

This commit is contained in:
yml2213
2026-08-31 10:55:44 +08:00
parent 840af3108e
commit 09ab80e062
68 changed files with 323 additions and 291 deletions
+7 -7
View File
@@ -73,7 +73,7 @@ def get_challenge_gt_bak() -> tuple[str, str]:
}
params = {
"t": str(int(round(time.time() * 1000))),
"t": str(round(time.time() * 1000)),
}
response = requests.get(
@@ -133,7 +133,7 @@ def get_js_address(gt: str, proxies: Mapping[str, str] | None = None) -> dict:
params = {
"gt": gt,
"callback": "geetest_" + str(int(round(time.time() * 1000))),
"callback": "geetest_" + str(round(time.time() * 1000)),
}
response = _get(
@@ -173,7 +173,7 @@ def get_c_s(
+ "&lang=zh-cn&pt=0&client_type=web&w="
+ w
+ "&callback=geetest_"
+ str(int(round(time.time() * 1000))),
+ str(round(time.time() * 1000)),
headers=headers,
proxies=proxies,
)
@@ -210,7 +210,7 @@ def req_fullpage_validate(
+ "&lang=zh-cn&pt=0&client_type=web&w="
+ w
+ "&callback=geetest_"
+ str(int(round(time.time() * 1000))),
+ str(round(time.time() * 1000)),
headers=headers,
proxies=proxies,
)
@@ -241,7 +241,7 @@ def req_slide(gt: str, challenge: str, w2: str) -> None:
+ "&lang=zh-cn&pt=0&client_type=web&w="
+ w2
+ "&callback=geetest_"
+ str(int(round(time.time() * 1000))),
+ str(round(time.time() * 1000)),
headers=headers,
timeout=REQUEST_TIMEOUT,
)
@@ -277,7 +277,7 @@ def get_picture(gt: str, challenge: str) -> tuple[str, str, list[int], str, str,
"isPC": "true",
"autoReset": "true",
"width": "100%",
"callback": "geetest_" + str(int(round(time.time() * 1000))),
"callback": "geetest_" + str(round(time.time() * 1000)),
}
response = requests.get(
@@ -343,7 +343,7 @@ def req_end(gt: str, challenge: str, w: str) -> dict:
+ "&lang=zh-cn&%24_BCm=0&client_type=web&w="
+ w
+ "&callback=geetest_"
+ str(int(round(time.time() * 1000))),
+ str(round(time.time() * 1000)),
headers=headers,
timeout=REQUEST_TIMEOUT,
)
+1 -1
View File
@@ -592,7 +592,7 @@ def H(t: int, e: str) -> str:
n = 36 * r[0] + r[1]
# 计算目标值
a = round(t) + n
a = (t) + n
# 构建字符池
_ = [[], [], [], [], []]
+2 -2
View File
@@ -85,7 +85,7 @@ def get_w2(gt: str, challenge: str, c: list[int], s: str, str_16: str) -> str:
"u": fake_timing["loadEventEnd"],
}
first_time = int(round(time.time() * 1000)) # 伪造脚本开始运行时间
first_time = round(time.time() * 1000) # 伪造脚本开始运行时间
guiji_yuanshu_shuzu = generate_realistic_trajectory(
start_x=random.randint(400, 600), # 起始位置随机
@@ -99,7 +99,7 @@ def get_w2(gt: str, challenge: str, c: list[int], s: str, str_16: str) -> str:
compressed = compress_trajectory(trajectory)
tt = encrypt_string(compressed, c, s)
passtime = str(int(round(time.time() * 1000)) - first_time)
passtime = str(round(time.time() * 1000) - first_time)
rp = simple_md5(gt + challenge + passtime)