import axios from 'axios'; import * as cheerio from 'cheerio'; import https from 'https'; async function test() { const agent = new https.Agent({ rejectUnauthorized: false }); try { const res = await axios.get('https://www.pvl.cz/portal/nadrze/cz/pc/Mereni.aspx?oid=1&id=VLL1', { httpsAgent: agent, headers: { 'User-Agent': 'Mozilla/5.0' } }); const $ = cheerio.load(res.data); const tables = $('table'); tables.each((i, tbl) => { console.log(`TABLE ${i}:`); console.log($(tbl).find('tr').first().text().trim().replace(/\s+/g, ' ')); console.log($(tbl).find('tr').eq(1).text().trim().replace(/\s+/g, ' ')); console.log('---'); }); } catch (e) { console.error(e.message); } } test();