summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--boards/scrapers/tournamentcalculator/scrape.py3
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 = []