nhl-api-py icon indicating copy to clipboard operation
nhl-api-py copied to clipboard

How To Access EDGE Advanced Stats

Open coreyjs opened this issue 11 months ago • 4 comments

Is your feature request related to a problem? Please describe. It seems that some NHL stats that are considered Edge or advanced stats are separate from the usual endpoints. These seem to be aggregated on the backend and loaded asynchronous to the front end as seen here https://edge.nhl.com/en/skater/8479420. From my digging around I can't see any obvious endpoints to access this date. Things such as Top skating speed, speed bursts, etc.

Describe the solution you'd like A way to access these via this package. It might be messy if we have to do web parsing, but if it works it works.

Additional context Data can be found https://edge.nhl.com/en/skater/8479420 for example

coreyjs avatar Dec 13 '24 15:12 coreyjs

This data on the NHL site is loaded via web sockets.

coreyjs avatar Dec 13 '24 15:12 coreyjs

I tried out a few things regarding this. Its a bit ugly, but we'll see. No time right now to jump on this.

coreyjs avatar Jan 25 '25 19:01 coreyjs

Hi all,

I’ve been working on unlocking advanced stats functionality to address issue #96. In my fork on the edge-stats branch, I’ve added: • advanced_stats.py: Implements advanced stats endpoints. • advanced_parsers.py: Parses the advanced data structures. • examples/: Demonstrates usage of the new features. • cookies.py: Adjusts cookie handling to support these endpoints.

You can check out the changes here: my fork. I’d appreciate any feedback or suggestions on the implementation!

hirememorey avatar Feb 11 '25 14:02 hirememorey

Awesome. It was a bit of a tricky thing to do, ill look forward to checking this out.

coreyjs avatar Feb 14 '25 14:02 coreyjs