diff --git a/main.py b/main.py index f49738b..dba24bb 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,5 @@ import os +import re import threading import time import requests @@ -86,11 +87,12 @@ def download_and_parse(): brand_raw = row[9] # col J brand = str(brand_raw) if brand_raw is not None else "" min_box_raw = row[10] # col K + description = re.sub(r'\s*\(\d+\).*$', '', str(row[2] or "")).strip() parsed.append( { "item_code": safe_int(row[1], 0), "ean": ean, - "description": str(row[2] or ""), + "description": description, "price_usd": safe_float(row[4], 0.0), "stock": safe_int(row[5], 0), "brand": brand,