From ef4d1f433fb16103c3f9e84ef616f13f61f4549f Mon Sep 17 00:00:00 2001 From: polyfloyd Date: Sun, 14 Jan 2024 13:53:38 +0100 Subject: [PATCH] s/ean/gtin/ --- inflatinator/revbank.py | 2 +- inflatinator/scrapers.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/inflatinator/revbank.py b/inflatinator/revbank.py index 7cd80ed..034463e 100644 --- a/inflatinator/revbank.py +++ b/inflatinator/revbank.py @@ -58,7 +58,7 @@ def update_product_pricings(src): product_aliases = set() if not line.startswith('#'): product_aliases = set(find_aliases.search(line)['aliases'].split(',')) - product_aliases.add(prod_info.ean) + product_aliases.add(prod_info.gtin) aliases = ','.join(sorted(product_aliases)) diff --git a/inflatinator/scrapers.py b/inflatinator/scrapers.py index d5d3042..45c8469 100644 --- a/inflatinator/scrapers.py +++ b/inflatinator/scrapers.py @@ -6,10 +6,10 @@ import subprocess class Product: - def __init__(self, name, price, ean, units): + def __init__(self, name, price, gtin, units): self.name = name self.price = price - self.ean = ean + self.gtin = gtin self.units = units def __str__(self): @@ -38,6 +38,6 @@ def ah_get_by_sku(ah_sku, units): return Product( name=schema['name'], price=Decimal(schema['offers']['price']), - ean=schema['gtin13'], + gtin=schema['gtin13'], units=units, )