cwendt94 / espn-api

ESPN Fantasy API! (Football, Basketball)
MIT License
649 stars 205 forks source link

Can I use this for the live ESPN Draft? #558

Open Travis-Barton opened 2 months ago

Travis-Barton commented 2 months ago

Sport

All

Summary

Hey all,

Can i use this during the live ESPN draft? will that reflect as players make changes if I call fetch again?

cwendt94 commented 2 months ago

Unfortunately you cannot. Currently ESPN uses different APIs for the live draft so the data won't reflect correctly until afterwards.

I tried looking into it last year and was not able to get it working live.

Travis-Barton commented 2 months ago

Dang, thanks for the quick response!

FrankieV26 commented 2 months ago

You beat me to the punch Travis. This is very cool either way.

ianfinley89 commented 2 months ago

So I know this is kind of last minute, but I got something working for live snake drafts on ESPN and I take your current roster, and the remaining available players and feed it to ChatGPT through an API call: https://github.com/ianfinley89/espn-ffassistant

It's pretty brittle however because I'm using selenium and general XPATHs so if anything changes on ESPNs side, it will break.

cwendt94 commented 2 months ago

Nice, thats a cool use cases using ChatGPT an selenium!

ianfinley89 commented 2 months ago

Thanks! I used the espn-api to get the initial list of available players as well as the total teams. I'm not sure how to get the league scoring attributes though (i.e PPR, vs STD, vs custom)

cwendt94 commented 2 months ago

You should be able to get it in the league class settings field that has scoring_type defined!