puppeteer修改默认浏览器

const puppeteer = require('puppeteer');
 
(async () => {
      const browser = await puppeteer.launch({
        executablePath: './chromium/chrome.exe',
        headless: false
      });
      const page = await browser.newPage();
      await page.goto('http://music.163.com/');
      await page.screenshot({path: 'music.png'});
      browser.close();
})();

 

posted @ 2020-04-09 09:30  Ai~低调  阅读(2966)  评论(0编辑  收藏  举报