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))
|
ean = str(int(ean_raw))
|
||||||
else:
|
else:
|
||||||
ean = str(ean_raw).strip()
|
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_raw = row[9] # col J
|
||||||
brand = str(brand_raw) if brand_raw is not None else ""
|
brand = str(brand_raw) if brand_raw is not None else ""
|
||||||
min_box_raw = row[10] # col K
|
min_box_raw = row[10] # col K
|
||||||
|
|||||||
Reference in New Issue
Block a user