import pw from '/Users/natebutler/code/stylize/node_modules/playwright/index.js'; const { chromium } = pw; const [url, w, h, expr] = process.argv.slice(2); const b = await chromium.launch({ args: ['--use-angle=swiftshader','--enable-unsafe-swiftshader'] }); const p = await b.newPage({ viewport:{width:+w,height:+h} }); await p.goto(url,{waitUntil:'networkidle'}); await p.waitForTimeout(1200); console.log(JSON.stringify(await p.evaluate(expr), null, 1)); await b.close();