feat: playwright scraper

This commit is contained in:
ISA
2025-08-18 14:16:44 +02:00
parent e6aafd6b0c
commit 8097246049
9 changed files with 7804 additions and 5 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

View File

@@ -0,0 +1,25 @@
// playwright/scraper/scrape-dashboard.js
import { chromium, devices } from "playwright";
import { writeFileSync } from "fs";
const browser = await chromium.launch();
const context = await browser.newContext({
...devices["iPad Pro 11 landscape"],
});
const page = await context.newPage();
await page.goto("http://localhost:3000/dashboard", {
waitUntil: "networkidle",
});
// HTML speichern
const html = await page.content();
writeFileSync("playwright/scraper/pages/dashboard-ipadpro.html", html);
// Screenshot speichern
await page.screenshot({
path: "playwright/scraper/pages/dashboard-ipadpro.png",
fullPage: true,
});
await browser.close();
// node playwright/scraper/scrape-dashboard.js