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

SportsGambler parsing crash - wait before call avoiding any ban #172

Closed axel3rd closed 3 years ago

axel3rd commented 3 years ago

Describe the bug

Release 1.7 occurs on #169 🔢

Exception in thread "main" java.lang.UnsupportedOperationException: No teams have been found, parsing problem
        at org.blondin.mpg.out.InjuredSuspendedSportsGamblerClient.getPlayers(InjuredSuspendedSportsGamblerClient.java:117)
        at org.blondin.mpg.out.AbstractInjuredSuspendedNotL2.getPlayers(AbstractInjuredSuspendedNotL2.java:91)
        at org.blondin.mpg.out.AbstractInjuredSuspendedNotL2.getPlayer(AbstractInjuredSuspendedNotL2.java:74)
        at org.blondin.mpg.out.AbstractInjuredSuspendedNotL2.getPlayer(AbstractInjuredSuspendedNotL2.java:30)
        at org.blondin.mpg.out.InjuredSuspendedWrapperClient.getPlayer(InjuredSuspendedWrapperClient.java:53)
        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)

Seems only on Windows OS.

axel3rd commented 3 years ago

Seems only on Windows OS.

Linux too 😢

axel3rd commented 3 years ago

The HTML content response of https://www.sportsgambler.com/football/injuries-suspensions/france-ligue-1/ (for sample) is:

<html>
<body>

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-55223548-2', 'auto');
  ga('send', 'pageview');

</script>

</body>
</html>
axel3rd commented 3 years ago

Currently can't reproduce 😢, seems to be random problem. Waiting new reproduction, from IDE, to see what happen exactly and how can be fixed (perhaps a retry mechanism).

axel3rd commented 3 years ago

Hummm ... when too many retry => https://www.sportsgambler.com/football/injuries-suspensions/england-premier-league/

So a "ban process" seems exist ... and when you call URL for all MPG leagues, it is a ban 😢.