An attempt to write a fantasy football bot in a week.
- Python 3
- Python modules
numpy
,pandas
,pulp
,requests
,torch
:pip3 install numpy
pip3 install pandas pulp requests torch
git clone https://github.com/ashharrison90/fantasy_pl.git
python3 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-model
To automatically make the transfers and set the starting lineup, set the --apply
flag:
python3 main.py <FANTASY_PL_USERNAME> --apply
To 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-squad
You 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 debug
For help:
python3 main.py --help