📜  puppeteer 保存文件 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:13.988000             🧑  作者: Mango

代码示例1
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  await page.screenshot({ path: 'example.png' });

  await browser.close();
})();