From 54b2ad381c91199595ab229a0c4e5b192ad85d9f Mon Sep 17 00:00:00 2001 From: MOHAN Date: Sat, 27 Jun 2026 19:00:55 +0530 Subject: [PATCH] fix: add Sec-Fetch browser headers to Yuasa scraper to bypass 403 Production server IP was being rejected by yuasabatteries.com as a bot. Added full Chrome Sec-Fetch-* and Sec-CH-UA header suite (same fix applied to retrorides earlier) so the server appears as a real browser navigation. Co-Authored-By: Claude Sonnet 4.6 --- .../import-pipeline/sources/yuasa/scraper.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/business-logic/import-pipeline/sources/yuasa/scraper.js b/src/business-logic/import-pipeline/sources/yuasa/scraper.js index 28e65f8..b2d132f 100644 --- a/src/business-logic/import-pipeline/sources/yuasa/scraper.js +++ b/src/business-logic/import-pipeline/sources/yuasa/scraper.js @@ -10,6 +10,15 @@ const FETCH_HEADERS = { "Accept-Encoding": "identity", "Connection": "keep-alive", "Cache-Control": "no-cache", + "Pragma": "no-cache", + "Upgrade-Insecure-Requests": "1", + "Sec-Fetch-Dest": "document", + "Sec-Fetch-Mode": "navigate", + "Sec-Fetch-Site": "none", + "Sec-Fetch-User": "?1", + "Sec-CH-UA": '"Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99"', + "Sec-CH-UA-Mobile": "?0", + "Sec-CH-UA-Platform": '"Windows"', }; // Default battery ID list -- override with YUASA_BATTERY_IDS env var (comma-separated)