Files
tenderpilot/scrapers/ted-eu.js
Peter Foster 6ca3e9c576 fix: clean Apply Now URLs and disable TED demo scraper
- Strip tracking query params from find_tender URLs (?origin=SearchResults)
- Disable TED EU scraper (requires browser automation, was using demo data)
- Update 220 find_tender database records with clean URLs
- Delete 4 TED demo records from database
- Add URL_FIX_SUMMARY.md documentation

All 615 tenders now have direct links to tender detail pages.
Fixes Apply Now button UX issue.
2026-02-15 13:18:50 +00:00

35 lines
1016 B
JavaScript
Executable File

import pg from 'pg';
import dotenv from 'dotenv';
dotenv.config();
const pool = new pg.Pool({
connectionString: process.env.DATABASE_URL || 'postgresql://tenderpilot:tenderpilot123@localhost:5432/tenderpilot'
});
/**
* TED EU Scraper - DISABLED
*
* The TED (Tenders Electronic Daily) website uses JavaScript rendering,
* which requires browser automation (Playwright/Puppeteer) to scrape effectively.
*
* For now, TED tenders are not included in TenderRadar.
*
* TODO: Implement with Playwright when needed
* API endpoint: https://api.ted.europa.eu/v3/notices/search (requires POST)
* Browser scraping: https://ted.europa.eu/en/search/result?placeOfPerformanceCountry=GBR
*/
async function scrapeTenders() {
console.log('[TED EU] Scraper disabled - requires browser automation');
console.log('[TED EU] To enable: implement Playwright/Puppeteer scraping');
await pool.end();
return;
}
if (import.meta.url === `file://${process.argv[1]}`) {
scrapeTenders();
}
export { scrapeTenders };