diff --git a/main.py b/main.py index 4fc3d44..9e6b4ad 100644 --- a/main.py +++ b/main.py @@ -41,7 +41,12 @@ def download_and_parse(): if row[1] is None: # col B (index 1) = item_code continue ean_raw = row[3] # col D - ean = str(int(ean_raw)) if ean_raw is not None else "" + if ean_raw is None: + ean = "" + elif isinstance(ean_raw, (int, float)): + ean = str(int(ean_raw)) + else: + ean = str(ean_raw).strip() brand_raw = row[9] # col J brand = str(brand_raw) if brand_raw is not None else "" min_box = row[10] if row[10] is not None else 1 # col K