Fix: use Contracts Finder search endpoint for notice URLs instead of broken /notice/ links
This commit is contained in:
@@ -59,7 +59,7 @@ async function scrapeTenders() {
|
|||||||
if (deadline && new Date(deadline) < new Date()) continue;
|
if (deadline && new Date(deadline) < new Date()) continue;
|
||||||
const authority = procurer?.name || 'Unknown';
|
const authority = procurer?.name || 'Unknown';
|
||||||
const location = planning?.budget?.description || tender.procurementMethod || '';
|
const location = planning?.budget?.description || tender.procurementMethod || '';
|
||||||
const noticeUrl = release.url || (sourceId ? 'https://www.contractsfinder.service.gov.uk/notice/' + sourceId.replace('ocds-b5fd17-', '') : '');
|
const noticeUrl = release.url || (sourceId ? 'https://www.contractsfinder.service.gov.uk/Published/Notices/OCDS/Search?query=' + encodeURIComponent(sourceId) : '');
|
||||||
const documentsUrl = tender.documents?.length > 0 ? tender.documents[0].url : '';
|
const documentsUrl = tender.documents?.length > 0 ? tender.documents[0].url : '';
|
||||||
|
|
||||||
// Extract value
|
// Extract value
|
||||||
|
|||||||
Reference in New Issue
Block a user