Skip to content

Commit 286f3bd

Browse files
authored
fix: 优化 POW 生成机制
1 parent 04c22bf commit 286f3bd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ def init_account_queue():
8989
DEEPSEEK_COMPLETION_URL = f"https://{DEEPSEEK_HOST}/api/v0/chat/completion"
9090
BASE_HEADERS = {
9191
'Host': "chat.deepseek.com",
92-
'User-Agent': "DeepSeek/1.0.11 Android/35",
92+
'User-Agent': "DeepSeek/1.0.13 Android/35",
9393
'Accept': "application/json",
9494
'Accept-Encoding': "gzip",
9595
'Content-Type': "application/json",
9696
'x-client-platform': "android",
97-
'x-client-version': "1.0.11",
97+
'x-client-version': "1.0.13",
9898
'x-client-locale': "zh_CN",
9999
'accept-charset': "UTF-8"
100100
}
@@ -430,7 +430,7 @@ def get_pow_response(request: Request, max_attempts=3):
430430
"target_path": challenge["target_path"]
431431
}
432432
pow_str = json.dumps(pow_dict, separators=(',', ':'), ensure_ascii=False)
433-
encoded = base64.b64encode(pow_str.encode("utf-8")).decode("utf-8").rstrip("=")
433+
encoded = base64.b64encode(pow_str.encode("utf-8")).decode("utf-8").rstrip()
434434
resp.close()
435435
return encoded
436436
else:

0 commit comments

Comments
 (0)