What is Puppeteer
Puppeteer is a Node library which provides a high-level API to control headless Chrome or Chromium over the DevTools Protocol. It can also be configured to use full (non-headless) Chrome or Chromium.
Well, according to the Puppeteer office Github documentation, It is a library, it provides API services, and it controls Chrome. It’s maintained by Chrome DevTools team, only supported in Node v7.6 or greater version, and only works with Chrome or Chromium.
Manipulates Chrome like a puppeteer with your code.
Requirements / Environment
- Node >= v7.6, Puppeteer requires
async/await
Need latest
chrome driver
, it will be automatically downloaded when you installpuppeteer
fromnpm
npm install puppeteer --save
Quick Try Out
Puppeteer provides a playground for a quick try out.
Taking a snapshot for my favirate clothing website:
Thoughts
The whole working process just like using a regular browser, open a web browser, enter a link, and go to the page, take a screenshot of the page, then close browser. Very easy to understand and use.
Base on the documentation, most of developers are using puppeteer as a testing tools for their projects, also it can be used to automating and scraping the website, you know, writing a robot to auto copping limited clothes or sneakers…🔥