fix: skip products with blank or non-numeric EAN codes
This commit is contained in:
5
main.py
5
main.py
@@ -69,6 +69,11 @@ def download_and_parse():
|
||||
ean = str(int(ean_raw))
|
||||
else:
|
||||
ean = str(ean_raw).strip()
|
||||
|
||||
# Skip products with blank or non-numeric EAN codes
|
||||
if not ean or not ean.isdigit():
|
||||
continue
|
||||
|
||||
brand_raw = row[9] # col J
|
||||
brand = str(brand_raw) if brand_raw is not None else ""
|
||||
min_box_raw = row[10] # col K
|
||||
|
||||
Reference in New Issue
Block a user