I am trying to create a function that loops through the players and gets a player's stats. However, I am never receiving the stats back. Here is the code:
queue = []
player_list = {}
def update_stats():
os.system("cls")
for player in queue:
url = f'https://api.mojang.com/users/profiles/minecraft/{player}'
response = requests.get(url)
uuid = response.json()['id']
requestlink = str(f"https://api.hypixel.net/player?key={api_key}&uuid=" + uuid)
hydata = requests.get(requestlink).json()
level = int(hydata['achievements']['bedwars_level'])
player_list[player] = [str(level)]
print(player_list)