mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-24 03:54:20 +00:00
Sistemato una cosina.
This commit is contained in:
parent
46eca1cf4c
commit
ca61ccc9bd
1 changed files with 4 additions and 1 deletions
5
steam.py
5
steam.py
|
@ -18,7 +18,10 @@ def getplayersummaries(steamid):
|
||||||
}
|
}
|
||||||
# Manda la richiesta ai server di Steam.
|
# Manda la richiesta ai server di Steam.
|
||||||
r = requests.get("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/", params=parametri).json()
|
r = requests.get("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/", params=parametri).json()
|
||||||
return r['response']['players'][0]
|
if len(r['response']['players']) > 0:
|
||||||
|
return r['response']['players'][0]
|
||||||
|
else:
|
||||||
|
raise NameError
|
||||||
|
|
||||||
|
|
||||||
def getnumberofcurrentplayers(appid):
|
def getnumberofcurrentplayers(appid):
|
||||||
|
|
Loading…
Reference in a new issue