Qilan2 commited on
Commit
c32c5f8
·
verified ·
1 Parent(s): a8ee64c

Update server2.py

Browse files
Files changed (1) hide show
  1. server2.py +5 -5
server2.py CHANGED
@@ -324,6 +324,11 @@ def check_api1():
324
  break
325
  url = f"{st_url}/csrf-token" # 确保这个 URL 是正确的
326
  try:
 
 
 
 
 
327
  if "token" in response_json:
328
  print("检测到 token")
329
  try:
@@ -335,11 +340,6 @@ def check_api1():
335
  # break # 跳出循环
336
  else:
337
  print("接口返回信息:", response_json)
338
- response = requests_retry_session().get(url, timeout=30)
339
- response.raise_for_status() # 检查响应状态
340
- # 尝试解析 JSON 响应
341
- response_json = response.json() # 获取 JSON 内容
342
- print(url,"接口返回信息:", response_json)
343
  except requests.exceptions.ConnectionError as e:
344
  print(f"接口异常1: {e}")
345
  # threading.Thread(target=Frpc, daemon=True).start()
 
324
  break
325
  url = f"{st_url}/csrf-token" # 确保这个 URL 是正确的
326
  try:
327
+ response = requests_retry_session().get(url, timeout=30)
328
+ response.raise_for_status() # 检查响应状态
329
+ # 尝试解析 JSON 响应
330
+ response_json = response.json() # 获取 JSON 内容
331
+ print(url,"接口返回信息:", response_json)
332
  if "token" in response_json:
333
  print("检测到 token")
334
  try:
 
340
  # break # 跳出循环
341
  else:
342
  print("接口返回信息:", response_json)
 
 
 
 
 
343
  except requests.exceptions.ConnectionError as e:
344
  print(f"接口异常1: {e}")
345
  # threading.Thread(target=Frpc, daemon=True).start()