$ pip install git+https://github.com/itsjohnward/grocer.git
- Download ChromeDriver from here https://chromedriver.storage.googleapis.com/index.html?path=83.0.4103.39/
- Set an environment variable pointing to where you downloaded it. i.e.
export CHROMEDRIVER_PATH=/Users/john/csci-e-29/grocer/chromedriver
Set your instacart username and password as environment variables like so:
export EMAIL=example@example.com
export PASSWORD=password
$ grocer <store> <action>
For example:
$ grocer wegmans times
date time price
index
0 Monday, May 11 4pm - 6pm $5.99
1 Monday, May 11 5pm - 7pm $5.99
2 Tuesday, May 12 10am - Noon $5.99
3 Tuesday, May 12 11am - 1pm $5.99
4 Tuesday, May 12 Noon - 2pm $5.99
5 Tuesday, May 12 1pm - 3pm $5.99
For example:
from grocer import GrocerClient
# Create a client instance
client = GrocerClient(merchant="wegmans", email="example@example.com", password="password")
# Call client methods
print(client.get_delivery_times())
See https://github.com/itsjohnward/grocer-notifier as an example of a project written using Grocer.
- Wegmans (Instacart)
- Fairway (Instacart)
- FreshDirect
- Amazon Fresh
- times: get available delivery times
- search: search for products
- add: add product to cart
- remove: remove product from cart
- cart: get the status of the current cart
- checkout: purchase the items currently in the cart