diff --git a/src/main/java/com/ko/footballupdater/datasource/FotmobDataSource.java b/src/main/java/com/ko/footballupdater/datasource/FotmobDataSource.java index 1749cfa..08e3da8 100644 --- a/src/main/java/com/ko/footballupdater/datasource/FotmobDataSource.java +++ b/src/main/java/com/ko/footballupdater/datasource/FotmobDataSource.java @@ -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