oseymour / ScraperFC

Python package for scraping soccer data from a variety of sources
GNU General Public License v3.0
222 stars 49 forks source link

Own Goals from FBRef causing Home/Away goals to be incorrect for the Final Score. #13

Closed slipshawn closed 1 year ago

slipshawn commented 1 year ago

Appreciate finding this package you created.

Just a heads up, in the FBRef.scrape_match() function, matches where there is an Own Goal cause the Home/Away goals to be incorrect. Since the goals are being selected from the 'Performance Summary' dataframe, it is not accounting for Own goals scored by the other team, only goals scored by that teams players.

You can see it in these 2 links particularly if you test them: https://fbref.com/en/matches/e4dc55d0/Arsenal-Burnley-December-13-2020-Premier-League https://fbref.com/en/matches/72fa1993/Everton-Arsenal-December-19-2020-Premier-League

If I'm able to make a simple change to get the final Home/Away goals correctly I'll make a pull request or update here.

oseymour commented 1 year ago

Hey @slipshawn! Thanks for reaching out for using the package! I'll add that to the to-do list. The whole FBRef module will be getting an overhaul cuz they changed their website a ton.

slipshawn commented 1 year ago

Sounds awesome and thanks again.

I was able to put together a small fix by just parsing the HTML I could add in, unless youre going to overhaul it a bunch.

If you'd like a hand or anything please let me know.

oseymour commented 1 year ago

Yeah the whole FBRef module is being updated and this fix will be part of that. Feel free to post your fix here though! Thanks @slipshawn .

oseymour commented 1 year ago

@slipshawn I just uploaded a new version, 2.1.4, that should have this fixed (along with the entire overhaul of the FBRef module). Let me know if it's working for you!

slipshawn commented 1 year ago

Awesome thanks for the adding fix it looks great!

oseymour commented 1 year ago

Awesome! Thanks for using the package and let me know if you find any other bugs or want any features added.