xcv58 / grocery-delivery-times

Check grocery delivery time for multiple websites
https://g.xcv58.org/94103
3 stars 1 forks source link

grocery-delivery-times

Grocery website delivery time check. It supports only Costco Same-Day Delivery for now. And more websites are coming.

Usage

Please make sure you have node and yarn installed. https://classic.yarnpkg.com/en/docs/install, https://nodejs.org/en/download/

  1. Clone this repo to your local machine
  2. Run yarn install
  3. Run yarn start --help

It will output:

$ yarn start --help
yarn run v1.19.2
$ node index.js --help
index.js

Watch grocery websites for delivery time

Options:
  --version                Show version number                         [boolean]
  --websites, -w           websites to watch
      [array] [required] [choices: "costco", "amazon-fresh"] [default: "costco"]
  --interval, -i           The check interval in minutes  [number] [default: 15]
  --zip, -z                The zip code to watch             [string] [required]
  --debug, -d                                         [boolean] [default: false]
  --costco_user, --cu                                                   [string]
  --costco_password, --cp                                               [string]
  --help                   Show help                                   [boolean]

Sample command to watch Costco for zipcode 10001 every 45 minutes:

yarn start --costco_user xxx@xxx.com --costco_password 123456 -w costco -z 10001 -i 45

The output:

$ node index.js --costco_user xxx@xxx.com --costco_password 123456 -w costco -z 10001 -i 45
4/7/2020 23:07:03 INFO: watching websites: [ 'costco' ] for zip: "10001" on every 10 minutes
4/7/2020 23:07:04 INFO: Costco: check delivery time for zip: 10001
4/7/2020 23:07:28 INFO: Costco: find no delivery time for 10001

And it would send a system notification if find an available delivery time slot:

image

Development

TODO