Day095 — puppeteer
2 min readAug 27, 2019
Here records the things I learned in a puppeteer project.
Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol.
API doc:
waitForNetworkIdle:
Run async function immediately:
How to handle Async/Await UnhandledPromiseRejectionWarning:
Debug Node.js in VS Code
Create directory if not exist:
Create file with fs Promises API:
check file / directory exist:
use es6 syntax in node:
Read file line by line:
Parse HTML:
Xpath Axes
Difference between . and text() in XPath: