|
|
@ -39,7 +39,7 @@ def get_online_size():
|
|
|
|
response = requests.get(url)
|
|
|
|
response = requests.get(url)
|
|
|
|
response.raise_for_status() # 如果响应状态码不是 200,会引发 HTTPError
|
|
|
|
response.raise_for_status() # 如果响应状态码不是 200,会引发 HTTPError
|
|
|
|
data = response.json()
|
|
|
|
data = response.json()
|
|
|
|
logging.info(f"请求{url} 返回参数: {data}")
|
|
|
|
logging.debug(f"请求{url} 返回参数: {data}")
|
|
|
|
return data.get('data', {}).get('online_num', 0)
|
|
|
|
return data.get('data', {}).get('online_num', 0)
|
|
|
|
|
|
|
|
|
|
|
|
except requests.exceptions.RequestException as e:
|
|
|
|
except requests.exceptions.RequestException as e:
|
|
|
|