Where the basket is cheaper: five chains compared
Prices are collected from five chains, converted to price per kilo, litre and piece, and summed up across the whole basket.
Task
“We need to compare the whole basket, not single items: where it is cheaper to buy regularly. By hand that is a week of work and still inaccurate.”
Solution
Price collection from five chains for a 31-item basket, conversion to unit prices, matching of comparable products, weekly and monthly basket totals, plus a no-loyalty-card figure.
Result
31 itemschecked across five chains in one run
unit priceper kilo, litre and piece
with and without cardthe cost of the discount is visible
How it works
Prices where they are real
Chain sites show prices for a delivery address, so collection runs in a normal browser with the address set — otherwise the numbers belong to someone else. Data is read from the sites' own responses, with pauses between requests: this is a comparison, not load.
Pack size and unit price
“930 ml”, “5 × 80 g”, “by weight” — everything is converted to price per kilo, litre or piece. Two traps showed up here: one chain quotes weighted goods per half kilo, another prices packed weighted goods per 100 grams. Both are covered by tests.
Comparable products only
For each query only sensible equivalents are kept: milk, not baked milk; fresh cucumbers, not pickled. The code then takes the cheapest suitable item and totals the basket. The report shows which product was chosen and at what price.
integrations
scope
Basket definition, address-aware price collection, pack-size parsing, product matching, basket totals, Excel report, repeatable single-command run.