1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Fixed db load function

This commit is contained in:
Steffo 2016-08-12 17:03:54 +02:00
parent b5e2a96c73
commit 6e7d702c00

View file

@ -3,13 +3,15 @@ import requests
import json
# Get player database from the db.json file
db = json.load("db.json")
file = open("db.json")
db = json.load(file)
file.close()
# List overwatch players
players = list()
for player in db:
if player["overwatch"] is not None:
players.append(player["overwatch"])
if db[player]["overwatch"] is not None:
players.append(db[player]["overwatch"])
# Get player data
async def get_player_data(platform: str, region: str, battletag: str):