Puppeteer. make yourself at chrome.

Narongsak Keawmanee
Medvine Tech
Published in
2 min readOct 27, 2018

I facing a lot problem when trying scrape website via programming. one of that thing is some website have high security and I can’t get through if using normal Curl Request (actually I can by simulate header of request for clam i’m real browser). but for this library you can literally get through everything by easy because you on chrome.

What is Puppeteer?

Puppeteer is Node library develop by google. make for simulate like you on Chrome itself. you can do everything in there like get page. checking are that page available?. testing and debugging include save that page to images or pdf file.

Normally Puppeteer will run on Chromium. which is another version of Chrome but open source project. some project will develop and release on Chromium first for check feedback and then improve before adjust that feature to Chrome.

Getting Start

First we need to install Puppeteer.

yarn add puppeteer

Then we will take screen short of https://www.google.com

If we look at path that we run file. we will see example.png

example.png

Puppeteer also can make automate browser test like Selenium. this code will show you how to input data in input field. we will search cat vs cucmber in youtube and auto get inside first clip that we found.

Hooray. we can watching cat by single command line.

That is for Puppeteer. now I will leave it to you to play around with it and you will see how powerful it is. if you like this article. don’t forget give me a big clap.

I appreciated all cup of coffee. you can donate coffee at button below.

https://www.buymeacoffee.com/klogic

--

--

Narongsak Keawmanee
Medvine Tech

Software Engineer at Refinitiv • Highly ambitious • Love working with great people • Never Stop Learning