diff --git a/sites/wegmans/wegmans.go b/sites/wegmans/wegmans.go index 0c9180f..e70c63b 100644 --- a/sites/wegmans/wegmans.go +++ b/sites/wegmans/wegmans.go @@ -117,11 +117,15 @@ 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.Unit == "lb" { - res.Price = res.UnitPrice + + // the unit might be like "lb.", so if it ends in a period, then just strip it off + if strings.HasSuffix(res.Unit, ".") { + res.Unit = strings.TrimSuffix(res.Unit, ".") } } } + slog.Info("res", "res", res) + return res, nil }