From d240ac2819bacbc43df3ca5d688e0288a1a1575f Mon Sep 17 00:00:00 2001 From: emkael Date: Sat, 24 Feb 2018 00:26:12 +0100 Subject: Running board count after all boards in segment are finished --- jfr_playoff/matchinfo.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'jfr_playoff') diff --git a/jfr_playoff/matchinfo.py b/jfr_playoff/matchinfo.py index f65c23c..997e685 100644 --- a/jfr_playoff/matchinfo.py +++ b/jfr_playoff/matchinfo.py @@ -180,9 +180,6 @@ class MatchInfo: def __has_towel_image(self, cell): return len(cell.select('img[alt="towel"]')) > 0 - def __has_running_board_count(self, cell): - return len(cell.select('img[alt="running..."]')) > 0 - def __get_html_running_boards(self, cell): return int(cell.contents[-1].strip()) @@ -218,7 +215,7 @@ class MatchInfo: return 1, 1 # entire match is toweled, so mark as finished else: raise ValueError('segments not found') - running_segments = [cell for cell in row.select('td.bdca') if self.__has_running_board_count(cell)] + running_segments = row.select('td.bdca') running_boards = sum([self.__get_html_running_boards(segment) for segment in running_segments]) finished_segments = [] boards_in_segment = None -- cgit v1.2.3