import puppeteer from 'puppeteer';
const b=await puppeteer.launch({executablePath:'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',headless:'new',args:['--no-sandbox']});
const p=await b.newPage();
await p.setViewport({width:process.env.W?+process.env.W:390,height:process.env.H?+process.env.H:1400,deviceScaleFactor:2});
await p.goto(process.env.URL,{waitUntil:'networkidle2',timeout:45000});
await new Promise(r=>setTimeout(r,2000));
await p.screenshot({path:process.env.OUT});
await b.close();
