From 57b83918dc133b083d689ce3b6962d080b376e6e Mon Sep 17 00:00:00 2001 From: Martin Madzin Date: Tue, 4 Jun 2024 20:13:19 +0200 Subject: [PATCH] Last "sum" row removed from race overview stages table --- procyclingstats/race_scraper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/procyclingstats/race_scraper.py b/procyclingstats/race_scraper.py index 86b108f..021278b 100644 --- a/procyclingstats/race_scraper.py +++ b/procyclingstats/race_scraper.py @@ -164,6 +164,9 @@ def stages(self, *args: str) -> List[Dict[str, Any]]: if not_p_icon: stage_e.remove() + # removes last row from stages table + for row in stages_table_html.css("tr.sum"): + row.remove() table_parser = TableParser(stages_table_html) casual_f_to_parse = [f for f in fields if f != "date"] table_parser.parse(casual_f_to_parse)