Skip to content

Commit

Permalink
Updated Fotmob url parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
This-Is-Ko committed Oct 21, 2023
1 parent 56cc24c commit 9d54e0b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ public PlayerMatchPerformanceStats parsePlayerMatchData(Player player, Document
Pattern pattern = Pattern.compile("/match/(\\d+)/");
Matcher matcher = pattern.matcher(latestMatchUrl);
if (!matcher.find()) {
return null;
pattern = Pattern.compile("/matches/.*/NaN#(\\d+)");
matcher = pattern.matcher(latestMatchUrl);
if (!matcher.find()) {
log.atInfo().setMessage("Cannot find match id from url").addKeyValue("player", player.getName()).log();
return null;
}
}

// Construct api url
Expand Down

0 comments on commit 9d54e0b

Please sign in to comment.