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 <noreply@anthropic.com>
This commit is contained in:
MOHAN 2026-08-08 23:09:33 +05:30
parent 6ba4dc7d83
commit d287801551
2 changed files with 2 additions and 2 deletions

View File

@ -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",

View File

@ -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",