From 1be6a2531e6f449a97cab8afd8b2e1e16397143d Mon Sep 17 00:00:00 2001 From: Peter Foster Date: Sat, 14 Feb 2026 18:33:12 +0000 Subject: [PATCH] Fix: use direct notice URLs for Contracts Finder and Sell2Wales instead of search fallbacks --- scrapers/contracts-finder.js | 2 +- scrapers/sell2wales.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scrapers/contracts-finder.js b/scrapers/contracts-finder.js index eea1faa..f6734ff 100755 --- a/scrapers/contracts-finder.js +++ b/scrapers/contracts-finder.js @@ -59,7 +59,7 @@ async function scrapeTenders() { if (deadline && new Date(deadline) < new Date()) continue; const authority = procurer?.name || 'Unknown'; const location = planning?.budget?.description || tender.procurementMethod || ''; - const noticeUrl = release.url || 'https://www.contractsfinder.service.gov.uk/Search'; + const noticeUrl = release.url || ('https://www.contractsfinder.service.gov.uk/notice/' + sourceId.replace('ocds-b5fd17-', '')); const documentsUrl = tender.documents?.length > 0 ? tender.documents[0].url : ''; // Extract value diff --git a/scrapers/sell2wales.js b/scrapers/sell2wales.js index a1e07d2..5a3ee9d 100644 --- a/scrapers/sell2wales.js +++ b/scrapers/sell2wales.js @@ -67,7 +67,7 @@ async function scrapeTenders() { const title = link.text().trim(); if (!title || title.length === 0) continue; - const noticeUrl = href.startsWith('http') ? href : 'https://www.sell2wales.gov.wales' + href; + const noticeUrl = release.url || ('https://sell2wales.gov.wales/Search/notice/' + sourceId); // Get the parent container for this tender const container = link.closest('div, li, tr');