You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
273 B

import requests
leaderboard_url = 'http://127.0.0.1:8000/polls/leaderboard/'
response = requests.get(leaderboard_url)
if response.status_code == 200:
print("排行榜数据:", response.json())
else:
print("请求失败:", response.status_code, response.text)