2026-02-14 17:12:51 +00:00
|
|
|
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'
|
|
|
|
|
});
|
|
|
|
|
|
2026-02-15 13:18:50 +00:00
|
|
|
/**
|
|
|
|
|
* 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
|
|
|
|
|
*/
|
2026-02-14 17:12:51 +00:00
|
|
|
|
|
|
|
|
async function scrapeTenders() {
|
2026-02-15 13:18:50 +00:00
|
|
|
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();
|
2026-02-14 17:12:51 +00:00
|
|
|
}
|
|
|
|
|
|
2026-02-15 13:18:50 +00:00
|
|
|
export { scrapeTenders };
|