Pringleman83/SportsBook

Postponed games showing in fixtures

Pringleman83 opened this issue · 3 comments

When searching for fixtures within a specified range, the code only checks for the future date when it needs to stop looking. Eg. for fixtures over the next five days, it will gather all predictions for until 5 days from now.

In the scraping process, anything with a score is considered a result. If there is no score it is considered a fixture.

The problem is, if a game is postponed, the "P" from the score is replaced with "" and the game is being considered a fixture. As there is no filter for how far back to look when looking for fixtures, the postponed games still show in fixtures. There is some logic to this I guess, as the games still need to be played. However, if the game is refactored into the fixtures, it'll show twice.

Anyway, I need to change how this works so that postponed games are not shown in upcoming fixtures.

Issue fixed by checking each fixture is scheduled for today or afterwards before adding it to the fixtures list.

Still seeing a problem (currently with an Argentinian league). Issue reopened until I can sort this out.

Finally fixed this. A previous fix was focused on where fixtures are reduced based on the selected or default date / game range. However, predictions are ran on all fixtures (before this reduction takes place).

Fixture dates are now checked before the scraper function returns them.