From d28780155167f9e2493e5f78e9337d96f88f7c52 Mon Sep 17 00:00:00 2001 From: MOHAN Date: Sat, 8 Aug 2026 23:09:33 +0530 Subject: [PATCH] fix(bikegear): use brand name from BRANDS list instead of JSON-LD brand field JSON-LD on bikegear.in has incorrect/all-caps brand names (e.g. "ACERBIS Hemets", full page titles as brand). Our BRANDS list has the correct clean names. Changed priority: brandName (our list) > jsonLd.brand.name > fallback. Applied to both standalone local scraper and server scraper. Co-Authored-By: Claude Sonnet 4.6 --- bikegear-local-scraper/bikegear-scraper.js | 2 +- src/business-logic/import-pipeline/sources/bikegear/scraper.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bikegear-local-scraper/bikegear-scraper.js b/bikegear-local-scraper/bikegear-scraper.js index 482ef78..5263899 100644 --- a/bikegear-local-scraper/bikegear-scraper.js +++ b/bikegear-local-scraper/bikegear-scraper.js @@ -353,7 +353,7 @@ async function scrapeProductDetail(productUrl, brandName) { url: productUrl, sku: jsonLd.sku || productUrl.split("/").pop(), name: jsonLd.name || "", - brand: jsonLd.brand?.name || brandName, + brand: brandName || jsonLd.brand?.name || "BikeGear", price, currency: jsonLd.offers?.priceCurrency || "INR", availability: jsonLd.offers?.availability?.replace("https://schema.org/", "") || "Unknown", diff --git a/src/business-logic/import-pipeline/sources/bikegear/scraper.js b/src/business-logic/import-pipeline/sources/bikegear/scraper.js index 8dfe1fd..c9f292f 100644 --- a/src/business-logic/import-pipeline/sources/bikegear/scraper.js +++ b/src/business-logic/import-pipeline/sources/bikegear/scraper.js @@ -561,7 +561,7 @@ async function scrapeProductDetail(productUrl, brandName, refererUrl = null) { url: productUrl, sku: jsonLd.sku || productUrl.split("/").pop(), name: jsonLd.name || "", - brand: jsonLd.brand?.name || brandName, + brand: brandName || jsonLd.brand?.name || "BikeGear", price, currency, availability: jsonLd.offers?.availability?.replace("https://schema.org/", "") || "Unknown",