axel3rd / mpg-coach-bot

MPG (Mon Petit Gazon) coach bot, to automate and optimize weekly actions
https://axel3rd.github.io/mpg-coach-bot/
MIT License
23 stars 8 forks source link

Injured & Suspended players: Switch from EquipeActu to SportsGambler #169

Closed axel3rd closed 3 years ago

axel3rd commented 3 years ago

Initially considered as a bug, this issue is finally updated as an improvement (see below).


Describe the bug

Exception in thread "main" java.lang.UnsupportedOperationException: No teams have been found, parsing problem
        at org.blondin.mpg.out.InjuredSuspendedEquipeActuClient.getPlayers(InjuredSuspendedEquipeActuClient.java:209)
        at org.blondin.mpg.out.InjuredSuspendedEquipeActuClient.getPlayers(InjuredSuspendedEquipeActuClient.java:178)
        at org.blondin.mpg.out.InjuredSuspendedEquipeActuClient.getPlayer(InjuredSuspendedEquipeActuClient.java:157)
        at org.blondin.mpg.out.InjuredSuspendedWrapperClient.getPlayer(InjuredSuspendedWrapperClient.java:47)
        at org.blondin.mpg.Main.removeOutPlayers(Main.java:337)
        at org.blondin.mpg.Main.processGames(Main.java:178)
        at org.blondin.mpg.Main.processLeague(Main.java:115)
        at org.blondin.mpg.Main.process(Main.java:83)
        at org.blondin.mpg.Main.main(Main.java:68)

Root cause

The injured & suspended players URL has change:

axel3rd commented 3 years ago

https://www.equipeactu.fr/injuries-suspensions could return HTTP 404 .... strange behavior it depends of time 😢.

axel3rd commented 3 years ago

Perhaps transfermarkt can be used, sample for L1: https://www.transfermarkt.fr/ligue-1/verletztespieler/wettbewerb/FR1/plus/1

Check if all championships are here, and if players injured/suspended are the same as equipeactu.

axel3rd commented 3 years ago

Perhaps transfermarkt can be used, sample for L1: https://www.transfermarkt.fr/ligue-1/verletztespieler/wettbewerb/FR1/plus/1 Check if all championships are here, and if players injured/suspended are the same as equipeactu.

Not a good idea, because for L1;

axel3rd commented 3 years ago

Best website seems to be sportsgambler.:

Type: