From 2273253aef2ca1be392e8b1c2e13a1f91d43904e Mon Sep 17 00:00:00 2001 From: polyfloyd Date: Sun, 22 Dec 2024 18:19:16 +0100 Subject: [PATCH] AH product unit sizes can have leading spaces --- inflatinator/scrapers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inflatinator/scrapers.py b/inflatinator/scrapers.py index e2b6652..82767e0 100644 --- a/inflatinator/scrapers.py +++ b/inflatinator/scrapers.py @@ -40,7 +40,7 @@ def ah_get_by_gtin(gtin13): units_description = ah_prod['salesUnitSize'] units = 1 - if (m := re.search(r'^(\d+)', units_description)): + if (m := re.search(r'^\s*(\d+)', units_description)): units = int(m[1]) return Product(