From 98a97bc04365db9becb1038f88e10866a829b280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gl=C3=BCpker?= Date: Fri, 26 Jan 2018 00:47:54 +0100 Subject: Ask SteamAPI for owned games and gamestats in CSGO. This is used in Premade Finder to maybe identify Smurfs. --- main.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index ae6030b..7577d2d 100755 --- a/main.py +++ b/main.py @@ -135,7 +135,7 @@ def lobby(): @app.route("/premadefinder", methods=['GET', 'POST']) def premades(): steamids = [] - profiles = dict() + premadedata = dict() connections = set() if request.method == 'POST': @@ -150,12 +150,12 @@ def premades(): ) # Ask steam about profiles - profiles = steam.getMultipleFriends(steamids) + premadedata = steam.getDataForPremadefinder(steamids) # Add connection between friends. # Friends are always bidirectional, so we use set and min/max to avoid duplicates for steamid in steamids: - for friend in profiles[steamid]['friends']: + for friend in premadedata[steamid]['_friends']: if friend in steamids: friend_a = min(steamid, friend) friend_b = max(steamid, friend) @@ -163,7 +163,8 @@ def premades(): return render_template('premades_html.jinja', steamids=steamids, - profiles=profiles, + profiles=premadedata, + display_time=display_time, connections=connections ) -- cgit v1.2.3