During the Covid-19 Italian lockdown (which started at the beginning of March 2020) we weren’t allowed to go out unless for strictly important reasons (medical, food & co.).
We usually went to Esselunga during “normal” times.
The issue we experienced was that the available spots for delivery were less than usual due to demand and were all booked in a matter of few minutes.
In order to address this, I’ve built a Python bot that visits the Esselunga website and navigates automatically ’til the delivery page is reached, from there I collect all the data of available spots, filter out the edge cases of “available-almost-complete” spots in which they were displayed as available but in reality once clicked they would spit out an error message saying that they were in fact not available.
Once all this data was collected I would save it in a DB and in the scenario in which I did found available spots, I would also send an alert via a Telegram bot.
The script is always running on a VPS, I display the data via a web-server which only the members of my family can visit (thanks UFW).
Every morning I also plot the density distributions of available spots during the peak hours.
I ran the service until the 8th of May '20, at that point the alerts were just too frequent and the graph would not really give me any insights on top of what I already knew from the very first few days.
Service retired on December 7th ‘20.
I also developed a routine that would automatically book and pay for the delivery, since Esselunga (rightfully so) decided to give delivery priority to the elderly during these times. I never actually do this. I just collect available data and send out alerts to my Family.