From d9a548b1429b068010ebae15607e668eafa2a6a9 Mon Sep 17 00:00:00 2001 From: Hiroki Sato Date: Mon, 6 Jan 2025 19:18:31 +0900 Subject: [PATCH] scripts: Fix standings extract script --- scripts/extract_standings.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/extract_standings.py b/scripts/extract_standings.py index c795249..f41b1b5 100755 --- a/scripts/extract_standings.py +++ b/scripts/extract_standings.py @@ -19,7 +19,6 @@ def add_css(element: bs4.element.Tag): # hack to edit .sticky-heading's 'top' attribute to 0. sticky_start = css_content.find('.sticky-heading') - print(sticky_start, file=sys.stderr) if sticky_start >= 0: match = re.compile(r"top:\s*[^;]+;").search(css_content, pos=sticky_start) css_content = css_content[:match.start()] + "top: 0;" + css_content[match.end():] @@ -45,7 +44,7 @@ def main(): main = html.select('#root > div > div.container')[0] # Find the teams list container. See StandingsTable.tsx for the structure. - teamsContainer = main.select('.standard-standings .standings-section')[-1].find('div') + teamsContainer = main.select('.standard-standings .standings-section')[-2].find('div') # Each team row has data-key attribute. Extract them and clear the list. teams = teamsContainer.select('div[data-key]')