|
|
|
@ -23,7 +23,7 @@ def get_recent_login_info(page_index=1, page_size=10):
|
|
|
|
|
data = response.json()
|
|
|
|
|
response.raise_for_status() # 如果响应状态码不是 200,会引发 HTTPError
|
|
|
|
|
logging.debug(f"请求{url} 返回参数: {data}")
|
|
|
|
|
except requests.exceptions.RequestException as e:
|
|
|
|
|
except Exception as e:
|
|
|
|
|
# 处理可能的请求错误
|
|
|
|
|
logging.info(f"recent_login_info请求发生错误: {e}")
|
|
|
|
|
|
|
|
|
@ -44,7 +44,7 @@ def get_online_size():
|
|
|
|
|
logging.debug(f"请求{url} 返回参数: {data}")
|
|
|
|
|
return data.get('data', {}).get('online_num', 0)
|
|
|
|
|
|
|
|
|
|
except requests.exceptions.RequestException as e:
|
|
|
|
|
except Exception as e:
|
|
|
|
|
# 处理可能的请求错误
|
|
|
|
|
logging.info(f"online_size请求发生错误: {e}")
|
|
|
|
|
return 0
|