kochlisGit / ProphitBet-Soccer-Bets-Predictor

ProphitBet is a Machine Learning Soccer Bet prediction application. It analyzes the form of teams, computes match statistics and predicts the outcomes of a match using Advanced Machine Learning (ML) methods. The supported algorithms in this application are Neural Networks, Random Forests & Ensembl Models.
MIT License
281 stars 104 forks source link

Can't parse French league due to webpage in French #68

Open KnightRider37 opened 4 months ago

KnightRider37 commented 4 months ago

When trying to predict all matches from the French league, it can't read the date, due to the fact that footy stats is in French. Because of this the date code doesn't match. How can this be fixed? Thanks

kochlisGit commented 4 months ago

hmm, that's weird. Can you send me a screenshot of footystats in french? i didn't know they got French language mode

KnightRider37 commented 4 months ago
Screenshot 2024-02-23 at 16 15 24

This is the way footystats comes up for French league and it doesn't read the date.

Screenshot 2024-02-23 at 16 17 20

this is the error I get

kochlisGit commented 4 months ago

can you also provide me the url of footystats that it tries to parse? e.g. For Ligue 1, it should be https://footystats.org/france/ligue-1/fixtures

KnightRider37 commented 4 months ago

https://footystats.org/fr/france/ligue-1/fixtures - it takes me to this one Don't know why there is the "fr". for other leagues I don't have this issue.

kochlisGit commented 4 months ago

image

I see. The problem can be seen in the image. It changes the class name, as well as the page format. The english version is different! I updated the file "fixtures/footystats/scraper.py" to add US language as the preferred language. It should be ok now.

KnightRider37 commented 4 months ago

Unfortunately it didn't solve the issue. tried with safari and chrome. still the same issue. I'll keep looking.

mnomoko commented 2 months ago

You have to replace fixtures_url within "database/entities/leagues/france.py". replace this: "fixtures_url='https://footystats.org/fr/france/ligue-1/fixtures'" with "fixtures_url='https://footystats.org/france/ligue-1/fixtures'". Then delete "database/storage/leagues/index.pkl" and recreate all your leagues.