tiredoftools / Whole-Foods-Delivery-Slot

Automated script for Whole Foods and Amazon Fresh delivery slot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Whole Foods and Amazon Fresh Delivery Slot Automated Script

Yes, amid COVID-19 trying to get Whole Foods and Amazon Fresh delivery slots can get cumbersome. To free you off the constant hassle of checking for slots (and almost never finding one), this automated script can notify you (yes notifies you verbally, so you can go about your tasks) of when new delivery slots open.

Usage:

Supports MacOS, Linux, and Windows.

The script works on Chrome (whole_foods_delivery_slot_chrome.py for Whole Foods) (amazon_fresh_delivery_slot_chrome.py for Amazon Fresh) and FireFox (whole_foods_delivery_slot_firefox.py) for now. This does not support "Autobuy feature".

Note, use the whole_foods_delivery_windows.py for Windows. Also, only for this OS, you'll have to install an additional package winsound

Autobuy feature:

If you'd like the script to select the first available time, and proceed all the way through checkout, please use the whole_foods_delivery_autobuy.py.

It initializes a webdriver, for which if you don't have one install it from: https://chromedriver.chromium.org/ for Chrome and https://github.com/mozilla/geckodriver/releases for FireFox.

You'll have to update the path of the this installed webdriver under: python driver = webdriver.Chrome() if its not the default location your OS needs. Similarly, for FireFox python driver = webdriver.Firefox(executable_path="<your-webdriver-path>")

Script was written on Python 2.7.10

The script works after you have added all the items to your cart! Note, have your cart ready before running this script! Also, please don't let your computer sleep. Let your computer do the work, while you sleep

After you clone the project:

Walkthrough for Chrome for Whole Foods, follow same steps if running on FireFox with the FireFox script

  1. Run the requirements.txt ($ pip install -r requirements.txt)
  2. Run whole_foods_delivery_slot_chrome.py ( $ python whole_foods_delivery_slot_chrome.py)
  3. The first time you run this script, Whole Foods cart will ask you to login. After you login, go to the "Shipping and Payment" window. Its titled: Schedule your order. Leave the script running.
  4. Get a nice warm Tea, browse reddit, do something on Xbox, etc.
  5. Once a slot opens the script will verbally notify you of an open slot.
  6. Proceed to checkout once you select a time slot. Stay Safe!

Non-coding background help:

For people with no background with coding there is this amazing post out there.

Note, I haven't written this blog, but I'd like to thank the person (don't who they are) who wrote it.

Visual Aid

Screen 1 alt text

Screen 2 alt text

Screen 3 alt text

Screen 4 alt text

Screen 5: Leave script running on this screen! alt text

FAQ

say is not a recognized command

If say is not native to your OS. Please try using winsound. Comment/delete the code in the script that has os.system('say...') and incorporate the following snippet:

import winsound

duration = 1000

freq = 440

os.system('say ...')

winsound.Beep(freq, duration)

As an example, you can look at any of the Windows scripts. Also, there are certain issues in this repository revolving around this issue that have been solved. Please feel to check them out too. Meanwhile, if you'd not like to edit, there is a PR: pcomputo#32, you can try to switch to that branch to get audible notifications. I'm in the testing phasing of this PR.

About

Automated script for Whole Foods and Amazon Fresh delivery slot

License:Apache License 2.0


Languages

Language:Python 100.0%