First use the function puppeteer-core
in executablePath()
to get the download path, then get the Chromium
current , and then use BrowserFetcher to download.
Function
The plug-in is used here VS-Code
as a demonstration, other crawlers or Electron
platforms are similar, and the source code is here to view .
VS-Code
Directly execute Hello World
the command , wait for the download completion message prompt, and Puppeteer Show
then execute the command to invoke the headless browser.
Environmental requirements
- Puppeteer-core instead of Puppeteer.
Enjoy!