import pkg from 'file:///D:/Projects/MarketingAgent/qa-tester/node_modules/playwright/index.js'; const { chromium } = pkg; const b = await chromium.connectOverCDP('http://127.0.0.1:9222'); const page = await b.contexts()[0].newPage(); await page.setViewportSize({ width: 1500, height: 1000 }); await page.goto('https://www.adrevsplit.com/aradmin/admin.php?b=4411', { waitUntil:'domcontentloaded', timeout:45000 }); await page.waitForTimeout(2500); const r = await page.evaluate(() => { const rows = [...document.querySelectorAll('table tr')].map(tr => [...tr.querySelectorAll('td,th')].map(td => td.innerText.replace(/\s+/g,' ').trim())); const links = [...document.querySelectorAll('a[href*="rmcircle"], a[href*="join"]')].map(a=>a.getAttribute('href')); return { rows: rows.filter(r2=>r2.length>3).slice(0,14), links: [...new Set(links)] }; }); console.log('=== approved login ads ==='); r.rows.forEach(x => console.log(' ' + x.join(' | ').slice(0,150))); console.log('\n=== destination links found ==='); r.links.forEach(l => console.log(' ' + l)); await page.close(); await b.close();