From 52f8121865b47a9f1230c3e42c5ee46e5ff64ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Thu, 9 Nov 2023 13:40:18 +0100 Subject: [PATCH] add excluded games list. export to html table --- get_sheet.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/get_sheet.py b/get_sheet.py index 5b3c392..97f0beb 100644 --- a/get_sheet.py +++ b/get_sheet.py @@ -2,6 +2,7 @@ import requests import requests_cache import json import csv +import pandas session = requests_cache.CachedSession('.hanab-live.cache') @@ -31,6 +32,8 @@ allowed_team_members = ['Carunty', 'HelanaAshryvr', 'rz'] allowed_players = [s.lower() for s in player_mapping.keys()] + [s.lower() for s in allowed_team_members] +excluded_games = [1056958] + player_cols = set() for _, p in player_mapping.items(): player_cols.add(p) @@ -67,6 +70,9 @@ def collect_player_games(): if len(players) not in [3,4,5]: continue + if game_id in excluded_games: + continue + ok = True for player in players: if player.lower() not in allowed_players: @@ -121,5 +127,5 @@ if __name__ == "__main__": num_others = row.get('Other', 0) row['Other'] = num_others + 1 writer.writerow(row) - - + a = pandas.read_csv("games.csv") + a.to_html("games.html")