Albert Heijn Node.JS delivery checker

Cover Image for Albert Heijn Node.JS delivery checker

Giving the current situation all over the world people started ordering more groceries online, including us. If you live in the Netherlands most likely you use Albert Heijn to do that. And giving the current influx of new orders it's pretty hard to find a delivery slot, sometimes for days.

While their website is pretty well designed, in order for you to look for slots you have to go on their calendar page and scroll it until you find one. So I thought that maybe I can automate this with JS.

Introducing ahdl, the little CLI that does that for you.

You can either install it or run it directly with npx.

Usage

npx @mihaiblaga89/ah-delivery check <postcode> or npm install -g @mihaiblaga89/ah-delivery

ahdl check <postcode> - replace <postcode> by your actual postcode like 9999AA

The script should give you a nice table output with the slots found if it finds some. But you'll have to move fast, since I tried placing an order 15 minutes after the script told me it had found a slot but it wasn't available anymore.

Options

-c, --cron will exit the command with an error if it finds a slot so you can easily set your cron up to send you emails when a script fails. That way it can notify you via email automatically. Or at least that's how I did it on my Synology NAS. 10 minute intervals and notify on error.

-l, --limit <days> will filter the slots based on the number of dates you specify. Maybe you're not interested in slots in 2 weeks time and be bombarded every 10 minutes by notifications saying that it has a slot for you then.

Feel free to use it as you see fit. Here's the source code for it.


More Stories

Cover Image for LottieFiles downloader

LottieFiles downloader

Today I needed a cool animation for a small website project, and, as usual, I headed over to LottieFiles to grab one. It’s not something I do often, maybe once every few months. But to my surprise, I ...

Mihai Blaga's profile picture
Mihai Blaga
Cover Image for ESPHome ESP32C3 Bootloop

ESPHome ESP32C3 Bootloop

If you’ve recently tried to get an ESP32-C3 board running with ESPHome, specifically using the esp-idf framework, you might have encountered a frustrating boot loop. The loop typically produces logs t...

Mihai Blaga's profile picture
Mihai Blaga