diff options
author | emkael <emkael@tlen.pl> | 2022-06-05 17:11:34 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2022-06-05 17:11:34 +0200 |
commit | ba50d9923455543aecf73af8141f199205127eda (patch) | |
tree | f3e3c3ae80fb6dd2f77b8c55d94d8353ac0030b3 /boards/scrapers | |
parent | e945682cfca3bf9bb54c780f2e331f09b6178ac2 (diff) |
Ability to scrape boards from certain scoring group in TC
Diffstat (limited to 'boards/scrapers')
-rw-r--r-- | boards/scrapers/tournamentcalculator/scrape.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/boards/scrapers/tournamentcalculator/scrape.py b/boards/scrapers/tournamentcalculator/scrape.py index d82c778..fcdd8b8 100644 --- a/boards/scrapers/tournamentcalculator/scrape.py +++ b/boards/scrapers/tournamentcalculator/scrape.py @@ -7,6 +7,7 @@ from urllib import parse results_url = parse.urlparse(sys.argv[1]) tournament_name = results_url.path.strip('/').split('/')[-1] +scoring_group = int(sys.argv[2]) if len(sys.argv) > 2 else 1 def get_json_content(remote_path): @@ -22,7 +23,7 @@ current_board_set = [] prev_board_number = 0 for board in sorted(board_numbers): - board_data = get_json_content('p%d.json' % board)['ScoringGroups'][0]['Distribution'] + board_data = get_json_content('p%d.json' % board)['ScoringGroups'][scoring_group-1]['Distribution'] if board_data['_numberAsPlayed'] < prev_board_number: board_sets.append(current_board_set) current_board_set = [] |