amosbastian / understat

An asynchronous Python package for https://understat.com/.
MIT License
150 stars 30 forks source link

Pulling Match Events Other Than Goals #10

Closed moss-xyz closed 4 years ago

moss-xyz commented 4 years ago

Would it be possible to add a new function to your package that allows you to pull all the events that happen in a match (and their corresponding times), which is essentially substitutions and cards? Doesn't seem to be supported with any of your current functions.

amosbastian commented 4 years ago

I can check if that is possible in the weekend!

moss-xyz commented 4 years ago

Thanks! I'm new to Python and really only use it for data science stuff but if there is something you think I can help with let me know!

amosbastian commented 4 years ago

I had a look at it and unfortunately it doesn't seem like there are any JSON objects in their page containing the information (only shots and roster data). It's probably coming from their backend directly and their API isn't public. Maybe you can consider scraping the page directly with Beautiful Soup for example or get the information from elsewhere. Good luck!

moss-xyz commented 4 years ago

Thanks for taking a look! Beautifulsoup it is :)