add excluded games list. export to html table
This commit is contained in:
parent
9fe6971268
commit
52f8121865
1 changed files with 8 additions and 2 deletions
10
get_sheet.py
10
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")
|
||||
|
|
Loading…
Reference in a new issue