From 1a7c928120bbe46ed09df3bacc74674ac7c53a08 Mon Sep 17 00:00:00 2001 From: Rene Fichtmueller Date: Wed, 6 May 2026 23:45:30 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20FS.COM=20price=20extraction=20=E2=80=94?= =?UTF-8?q?=20use=20.no=5Ftax/.price=20CSS=20selectors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FS.com changed their HTML structure; compound class names are gone. Current layout (verified 2026-05-06):
5,10 € ohne MwSt.
← B2B net price (preferred)
6,07 €
← gross fallback
6,07 €
← gross fallback Old selectors ([class*='price-value'] etc.) matched nothing → all prices stored as €? null. New .no_tax first gives us the correct net/B2B price. --- packages/scraper/src/scrapers/fs-com.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/scraper/src/scrapers/fs-com.ts b/packages/scraper/src/scrapers/fs-com.ts index 1a1b711..d00b17b 100644 --- a/packages/scraper/src/scrapers/fs-com.ts +++ b/packages/scraper/src/scrapers/fs-com.ts @@ -440,8 +440,19 @@ async function scrapeProductDetails( // FS.com shows "Gratis Versand ab 79 € (ohne MwSt.)" on every page. // bodyText regex matches this and returns 79 for ALL products. We extract // the actual product price from its own DOM element, skipping bad parents. + // ── Net price (ohne MwSt) preferred for B2B comparisons ────────────── + // FS.com HTML structure (verified 2026-05-06): + //
5,10 € ohne MwSt.
← net price ✓ + //
6,07 €
← gross price + //
6,07 €
← gross + // The .no_tax element contains the B2B net price — prefer it. let priceRaw = ""; const PRICE_SELS = [ + // ── FS.com current structure (2026-05) — net price first ── + ".no_tax", // "5,10 € ohne MwSt." — net/B2B price + ".standard_price", // "6,07 €" — gross fallback + ".price", // "6,07 €" — gross fallback (simple class) + // ── Legacy / other patterns ─────────────────────────────── "[class*='price-value']", "[class*='product-price']", "[class*='prod-price']",