Skip to content

Commit

Permalink
fix(match): adapt to current VLR page structure, else we got no round…
Browse files Browse the repository at this point in the history
… data

Signed-off-by: Akhil Narang <[email protected]>
  • Loading branch information
akhilnarang committed Nov 23, 2024
1 parent 042db36 commit 5d6654e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/services/matches.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ async def get_map_data(data: ResultSet) -> Tuple[list, int]:
# TODO: find a better solution, only done to prevent warning at 201 (tuple[int, ...] vs tuple[int, int])
prev: tuple[int, ...] = (0, 0)
for round_data in map_data.find_all("div", class_="vlr-rounds-row-col")[1:]:
if round_current_score := round_data.find_all("div", class_="rnd-currscore"):
round_score = clean_string(round_current_score[0].get_text())
if round_current_score := round_data.get("title"):
round_score = clean_string(round_current_score)
side, round_winner = "", ""
if round_score != "":
current = tuple(map(int, round_score.split("-")))
Expand Down

0 comments on commit 5d6654e

Please sign in to comment.