Head to head points
To use Docker:
docker-compose build
docker-compose run fbball bash
Rename config_sample.py
to config.py
.
- Create a Yahoo app
- Update
config.py
- Run
get_refresh_token.py
to go through authorization code flow to get access token - Save refresh token in
config.py
Update config.py
with the following league settings:
- Set the sport / season id in
YAHOO_SPORT_ID
python yahoo.util.py
will print the sport / season id.
- Set the league id in
YAHOO_LEAGUE_ID
- (optional if scraping from Yahoo)
- Set a Yahoo cookie in
YAHOO_COOKIE_STRING
- Set the column number of stats in the player projections page in
YAHOO_STATS_MAPPING
- Set a Yahoo cookie in
retrieve_roster.py
- Retrieves the current rosters of all teams (using the Yahoo API).
scrape_hashtagbasketball.py
- Scrapes hashtagbasketball.com for the latest rest of season projections.
- If head to head, enter the Monday of the first week of the season in
SEASON_START
- These scripts assume that weekly scoring starts on Mondays
- Update
schedule_{current year}.csv
with the correct schedule for the current season.- Update
calc_h2h_points.py
to use the right schedule.
- Update
calc_h2h_points.py
- Assigns values to players for a head to head points league based on projections and game schedule for the next few weeks and rest of season.
scrape_yahoo.py
- Using a Yahoo cookie, scrape the Yahoo rest of season projections for all players currently on a roster.
retrieve_standings.py
- Get current roto standings in league
calc_roto.py
- Outputs player valuations and which players to acquire