summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-02-24 00:26:12 +0100
committeremkael <emkael@tlen.pl>2018-02-24 00:26:12 +0100
commitd240ac2819bacbc43df3ca5d688e0288a1a1575f (patch)
tree26ef0ded82e490d9f7469ef457db3ba93fcd2e70
parentb30e786b2f647151fbc358d185d13e45cbc75b84 (diff)
Running board count after all boards in segment are finished
-rw-r--r--jfr_playoff/matchinfo.py5
1 files changed, 1 insertions, 4 deletions
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