安装
set PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
npm i puppeteer
截图
const puppeteer = require('puppeteer');
(
async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('http://jira.zmops.cc/browse/TK-880');
await page.screenshot({ path: 'example.png' });
await browser.close();
}
)();