From 9ae8619f937bee42efa4bc550a7d93ba43388443 Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Sat, 11 Oct 2025 23:34:41 -0400 Subject: [PATCH] Enhance price parsing to handle non-zero unit price Updated price extraction logic to set `Price` from `UnitPrice` when it is non-zero, ensuring more accurate parsing. --- sites/wegmans/wegmans.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sites/wegmans/wegmans.go b/sites/wegmans/wegmans.go index a2cbe25..f49db26 100644 --- a/sites/wegmans/wegmans.go +++ b/sites/wegmans/wegmans.go @@ -117,6 +117,9 @@ func (c Config) GetItemPrice(ctx context.Context, b extractor.Browser, u *url.UR if len(units) > 1 { res.Unit = strings.TrimSpace(units[1]) res.UnitPrice, _ = strconv.ParseFloat(units[0], 64) + if res.UnitPrice != 0 { + res.Price = res.UnitPrice + } } }