64 lines
2.7 KiB
JavaScript
64 lines
2.7 KiB
JavaScript
const { chromium } = require("playwright");
|
|
(async () => {
|
|
const b = await chromium.launch({ headless: true, args: ["--no-sandbox","--disable-gpu","--disable-dev-shm-usage"] });
|
|
const ctx = await b.newContext({ viewport: {width:1920,height:1080} });
|
|
const pg = await ctx.newPage();
|
|
try {
|
|
await pg.goto("https://weval-consulting.com/aapreview.html", { waitUntil: "load", timeout: 35000 });
|
|
await pg.waitForTimeout(15000);
|
|
|
|
const r = await pg.evaluate(() => {
|
|
const cards = Array.from(document.querySelectorAll(".ag-card"));
|
|
const visible = cards.filter(c => {
|
|
const r = c.getBoundingClientRect();
|
|
return r.width > 5 && r.height > 5 && r.top > 0 && r.left > 0 && r.top < 1080 && r.left < 1920;
|
|
});
|
|
|
|
const samples = cards.slice(0, 20).map(c => {
|
|
const rect = c.getBoundingClientRect();
|
|
const pav = c.querySelector(".p-av");
|
|
const pavRect = pav ? pav.getBoundingClientRect() : null;
|
|
const cs = pav ? getComputedStyle(pav) : null;
|
|
return {
|
|
name: c.dataset.agent,
|
|
tier: c.dataset.tier,
|
|
card: Math.round(rect.width)+"x"+Math.round(rect.height)+" @ "+Math.round(rect.left)+","+Math.round(rect.top),
|
|
pav: pavRect ? Math.round(pavRect.width)+"x"+Math.round(pavRect.height) : "0x0",
|
|
cs_w: cs ? cs.width : null,
|
|
cs_h: cs ? cs.height : null,
|
|
cs_disp: cs ? cs.display : null,
|
|
emoji: pav ? pav.textContent : null,
|
|
};
|
|
});
|
|
|
|
const newOnes = ["DeepSeek","WeasyPrint","Apple Edition","WTP Hub","Cowork","Vision 3D","Nuclei","BioPython","Selenium","Director","Master Router"];
|
|
const news = newOnes.map(n => {
|
|
const c = document.querySelector('[data-agent="' + n + '"]');
|
|
if (!c) return {name:n, found:false};
|
|
const rect = c.getBoundingClientRect();
|
|
const pav = c.querySelector(".p-av");
|
|
const pavRect = pav ? pav.getBoundingClientRect() : null;
|
|
return {
|
|
name: n,
|
|
card_size: Math.round(rect.width)+"x"+Math.round(rect.height),
|
|
card_pos: Math.round(rect.left)+","+Math.round(rect.top),
|
|
pav_size: pavRect ? Math.round(pavRect.width)+"x"+Math.round(pavRect.height) : "0x0",
|
|
emoji: pav ? pav.textContent : null,
|
|
on_screen: rect.left > 0 && rect.left < 1920 && rect.top > 0 && rect.top < 1080
|
|
};
|
|
});
|
|
|
|
return {
|
|
total_cards: cards.length,
|
|
visible_count: visible.length,
|
|
samples_first_20: samples,
|
|
new_render: news
|
|
};
|
|
});
|
|
|
|
console.log("DEEP_SCAN:");
|
|
console.log(JSON.stringify(r, null, 2));
|
|
} catch(e) { console.log("ERR:", e.message); }
|
|
await b.close();
|
|
})();
|