Enhancing the Whole Foods / Amazon Fresh delivery experience.
Born out of frustration with the perennially unavailable Whole Foods / Amazon Fresh delivery slot, this is a simple script that uses an automated browser (Selenium) to navigate to your cart and refresh the delivery slot selection page until there is an opening. When a slot is found, a friendly voice emanates from your speakers informing you of your good fortune.
If called with the --checkout
flag, the program will also attempt to select a slot for you and checkout automatically.
Optionally, you can choose to be notified via SMS (Twilio) and/or Telegram by supplying API credentials in conf.toml
.
More on these services here:
git clone https://github.com/mark-thompson/whole-foods-deliverance.git
.
with the download location
(e.g. ~/Downloads
, C:\Users\{username}\Downloads
)):
cd ./whole-foods-deliverance
python3 -m venv env
. env/bin/activate
. env/Scripts/activate
pip install -r requirements.txt
Do this if you want to send SMS/Telegram notifications or specify delivery slot preferences
cp conf_template.toml conf.toml
conf.toml
with your favorite text editor and insert your API credentialsThe default requirements assume you are using the current stable version of Chrome (version 81). If you are using a beta or dev release (version 82+) and you get an error when running the script, run:
pip install --upgrade chromedriver-binary
If you are still using Chrome version 80, run:
pip install --upgrade chromedriver-binary==80.0.3987.106.0
Run the script with the default options:
python run.py
Or specify one or more options to change the script behavior. e.g.:
python run.py -s 'Amazon Fresh' --checkout --ignore-oos --debug
Specify the delivery service you are using with the -s
or --service
option. Quotes are required.
Defaults to: 'Whole Foods'
python run.py -s 'Amazon Fresh'
Use the -c
or --checkout
flag to attempt to checkout automatically when a slot is found. Uses your delivery window preferences as specified in conf.toml
under the slot_preference
key. _See: config template_
python run.py --checkout
At some point, you may encounter an out of stock alert. By default, the program will produce an audio alert and give you some time to continue through the alert prompt if you've decided the item in question isn't essential to your order.
Use the --ignore-oos
flag if you'd like to bypass these alerts automatically.
Details of the removed items will be saved to a local file: removed_items_{timestamp}.toml
python run.py --ignore-oos
Occasionally (and rather unhelpfully), items will disappear from your cart without generating any kind of alert.
Use the --save-cart
flag to write a local file containing all of your cart items before the slot search begins.
python run.py --save-cart
Among other things, the --debug
flag will save the current page source if a Selenium error is encountered. Use this if you are getting an error and want to help contribute to a fix
python run.py --debug
Inspiration credit: this much more interestingly named project