Sign inSign up

raainman/delivery-checker-ah

By raainman

•Updated over 5 years ago

delivery checker for ah (forked)

Image
0

1.0K

raainman/delivery-checker-ah repository overview

AH Delivery Checker checks AH website and post available delivery slots to a slack channel via slack webhook⁠. It uses playwright⁠ to visit the website and get relevant cookies, before issuing the api call.

⁠Run locally

To run locally, use the following command and replace the environment variables with yours:

docker build -t ah-checker .
docker run -it -e SLACK_WEB_HOOK=https://hooks.slack.com/services/foobar \
    -p 8080:8080 -e "SLACK_CHANNEL=#random" -e POSTCODE=1234AB -e HOUSENUMBER=101 ah-checker

In another shell, simply issue a GET request:

curl http://127.0.0.1:8080

Then you'll receive the available slots in your slack channel.

⁠Run in Google Cloud Run

Here's my setup for Cloud Run:

  • Run the container as a Cloud Run service
  • Use Cloud Scheduler to trigger Cloud Run every 10 minutes

Note that the Cloud Run container needs 2GB memory to run.

Reference: https://cloud.google.com/run/docs/triggering/using-scheduler⁠

Tag summary

Content type

Image

Digest

Size

749.6 MB

Last updated

over 5 years ago

docker pull raainman/delivery-checker-ah