mirror of
https://github.com/nethunterzist/trendyol-analiz
synced 2026-07-01 01:17:04 +00:00
chore: satıcı/buybox/trendyol_product alanlarını kaldır
Ne yaptık: - data_consolidator.py'de "Satıcı bilgileri" bloğunu sildik - Return dict'ten seller_count, has_buybox, is_trendyol_product alanlarını çıkardık Neden yaptık: - merchantListings Trendyol'un public API'sinden gelmediği için seller_count her zaman 0, has_buybox her zaman false dönüyordu. - is_trendyol_product barcode-prefix tabanlıydı, güvenilirliği düşüktü. - SellerX (CiroNet) tarafında frontend bu sütunları zaten kaldırdı — scraper response'unda da gereksiz yer kaplamasın diye temizliyoruz.
This commit is contained in:
@@ -248,11 +248,6 @@ def normalize_product(raw_product, category_name, social_details):
|
||||
)
|
||||
break
|
||||
|
||||
# ── Satıcı bilgileri ──
|
||||
seller_count = len(merchant_listings)
|
||||
has_buybox = merchant_listings[0].get("isWinner", False) if merchant_listings else False
|
||||
is_trendyol_product = barcode.startswith(("TYB", "SGT", "KPE", "RTN", "CDM")) if barcode else False
|
||||
|
||||
return {
|
||||
"id": product_id,
|
||||
"name": raw_product.get("name", ""),
|
||||
@@ -272,9 +267,6 @@ def normalize_product(raw_product, category_name, social_details):
|
||||
"image_url": image_url or "https://via.placeholder.com/150",
|
||||
"url": product_url,
|
||||
"in_stock": raw_product.get("inStock", False),
|
||||
"seller_count": seller_count,
|
||||
"has_buybox": has_buybox,
|
||||
"is_trendyol_product": is_trendyol_product,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user