An attempt to write a fantasy football bot in a week.
- Python 3
- Python modules
numpy,pandas,playwright,pulp,requests,torch:pip3 install -r requirements.txtplaywright install --with-deps chromium
git clone https://github.com/ashharrison90/fantasy_pl.gitpython3 main.py <FANTASY_PL_USERNAME>This will use the current model stored under data/model.pt. To create a new model instead use (note: this may take a lot longer):
python3 main.py <FANTASY_PL_USERNAME> --update-modelTo automatically make the transfers and set the starting lineup, set the --apply flag:
python3 main.py <FANTASY_PL_USERNAME> --applyTo ignore the current squad when calculating a new squad (useful when starting the season/using a wildcard), set the --ignore-squad flag:
python3 main.py <FANTASY_PL_USERNAME> --ignore-squadYou can optionally provide your password as a command line flag:
python3 main.py <FANTASY_PL_USERNAME> --password <FANTASY_PL_PASSWORD>You can specify the log level for stdout:
python3 main.py <FANTASY_PL_USERNAME> --log-level debugFor help:
python3 main.py --help