I’ve been teaching lili2311 development beyond just the basics of frontend so we needed a project to work towards and ended up with this! It’s nothing too complex but it’s really helped her grok some backend stuff and she implemented the entirety of the Deliveroo handling stuff just recently.
It’s a browser extension which displays food hygiene ratings from the Food Standards Agency on popular UK food delivery websites: Just Eat, Hungry House & Deliveroo. You can see it action here: 1, 2 & 3.
There’s 3 main components: the core & API, the scraper and the extension itself. We scrape the sites in question, then do the lookups ourselves in a number of different ways and record the results. We found the other solutions quite slow as they worked client side and relied on doing one lookup per restaurant directly to the FSA’s API. This meant that on some Just Eat listing pages with 200-300 restaurants, your browser would basically be caning the server powering the FSA API which didn’t result in a great experience. The components:
The scraper handles scraping the sites so that we know about all the restaurants on there before you do, that bit is written in Python with thanks to the wonderful Scrapy project. It writes its results to Amazon S3.
We’re both happy to answer any questions :)