Add sector classification module, integrate into all 7 scrapers, fix CF pagination
This commit is contained in:
21
test-etenders.js
Normal file
21
test-etenders.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import axios from 'axios';
|
||||
import * as cheerio from 'cheerio';
|
||||
|
||||
const url = 'https://etendersni.gov.uk/epps/home.do';
|
||||
try {
|
||||
const resp = await axios.get(url, { timeout: 10000 });
|
||||
const $ = cheerio.load(resp.data);
|
||||
|
||||
console.log('Page fetched, looking for links...');
|
||||
let found = [];
|
||||
.each((i, el) => {
|
||||
const href = .attr('href');
|
||||
const text = .text().trim();
|
||||
if (href && href.includes('list')) {
|
||||
found.push([text.substring(0, 50), href]);
|
||||
}
|
||||
});
|
||||
console.log('Found links:', found);
|
||||
} catch (e) {
|
||||
console.log('Error:', e.message);
|
||||
}
|
||||
Reference in New Issue
Block a user