zwischenstand daten definieren

master
Hofei90 5 years ago
parent cf21bf0f0f
commit 9efb14938b

@ -12,8 +12,26 @@ import pprint
URL = "https://api.tracker.gg/api/v2/modern-warfare/standard/profile/battlenet/Hofei%232237"
r = requests.get(URL)
j_r = json.loads(r.text)
data = json.loads(r.text)
#pprint.pprint(j_r)
data["userInfo"]["userId"] #userid int
stats = data["segments"][0]["stats"] #Schreibweise verkürzen
stats["kills"]["value"] # Int
stats["deaths"]["value"] # Int
stats["assists"]["value"] # Int
stats["suicides"]["value"] # Int
stats["totalGamesPlayed"]["value"] # Int
stats["wins"]["value"] # Int
stats["losses"]["value"] # Int
stats["ties"]["value"] # Int
stats["timePlayedTotal"]["value"] # int
stats["averageLife"]["value"] # float seconds
stats["careerScore"]["value"] # int
stats["headshots"]["value"] # int
stats["totalShots"]["value"] # int
stats["hits"]["value"] # int
stats["misses"]["value"] # float seconds
#pprint.pprint(data)
print(j_r["data"])
Loading…
Cancel
Save