Headless-browser automation for ordering food via mahlzeit.online lunch provider.
(Implemented for the @hokify Monthly Know-How Austausch session April 2022, an 'integrations-crew' project.)
🦘 skippy rulez
Install the dependencies: npm install
Set your credentials to the environment variables (depending on your OS): SECRET_FOOD_EMAIL
and SECRET_FOOD_PASSWORD
accordingly, how you normally log in to the platform.
npm run order [food]
...to order your favorite food (if available) for the next day. Enter one string for the food choice as parameter. (Default: Eiernockerl)
Example: npm run order schnitzel
npm run dev
...to run the script via nodemon, automatically re-runs the script on code change, for development purposes.
Pro-tip: It might make sense if you change headless: true
to headless: false
in the options object, so you see more of what you actually do.