aptmac / dfs-helper-nfl

Python scripts for optimizing Daily Fantasy Football line-ups. In the 2021 season it got ranked Diamond (99th percentile) in Yahoo DFS quickmatches, and placed 504/223186 in the season-long 2021 Yahoo cup.
MIT License
5 stars 0 forks source link

fetch script doesn't work on new FP tables #2

Closed aptmac closed 2 years ago

aptmac commented 3 years ago

FP changed the URL for their weekly projected ranking tables, but more importantly they have been updated to be similar to the new draft rankings table. The problem here is that the table is populated via JavaScript a short time after the website initially loads, so scraping the html becomes a bit more difficult.

This can use the same approach as draftaid-react, and use Selenium on a timer to wait until the data populates and then scrape the data.

aptmac commented 2 years ago

Turns out it's not the JavaScript tables, they just added a wonky new table header that made Pandas mad.

Fixed in: https://github.com/aptmac/dfs-helper/pull/3