import { chromium } from "/home/user/Projects/yt-dlp-transcript-browser/node_modules/.pnpm/@playwright+test@1.59.1/node_modules/@playwright/test/index.mjs"; const site = process.argv[2] ?? "https://jeralyzer.pages.dev"; const browser = await chromium.launch(); const page = await browser.newPage(); page.setDefaultTimeout(60_000); await page.goto(site + "/", { waitUntil: "domcontentloaded" }); const first = page.locator("[data-result-slug]").first(); await first.waitFor({ timeout: 60_000 }); await first.click(); await page.getByRole("button", { name: /Mark both clip start and end first|Copy yt-dlp download command|Copy share link/i }).first().waitFor({ timeout: 60_000 }); const ytdlp = page.getByRole("button", { name: /Mark both clip start and end first|Copy yt-dlp download command/i }); const dl = page.getByRole("button", { name: /Download this transcript as a file/i }); const md = page.getByRole("button", { name: /Copy this transcript as Markdown/i }); console.log(`${site}: yt-dlp=${await ytdlp.count()} download-file=${await dl.count()} copy-md=${await md.count()}`); await browser.close();