Skip to main content

Getting Started With Google Puppeteer

Hello Everyone!. I am called Godwill from trycoder.com. Today, we are going to talk about Google puppeteer. Have you ever heard about it?.

If this is your first time, then welcome to the mind-blowing features of Puppeteer.
Puppeteer is really an amazing tool.

What is it all about?

According to the developers of Puppeteer, it is a “Puppeteer is a Node library which provides a high-level API to control headless Chrome or Chromium”.

This basically means anything that can be done with a normal browser can be done with Google puppeteer.
Headless meaning, you won’t actually see a chrome window opening, but things happen at the background.
Isn’t it awesome!

You might be wondering, what exactly can this puppeteer do?

Well, as mentioned earlier, think of the things you normally do in a browser like;

  1. Submitting forms
  2. Typing
  3. Checking a website’s mobile view via dev tools
  4. Opening websites
  5. Generate screenshots, PDF and much more...

And guess what!, Puppeteer can do all this heedlessly (without opening a physical browser).

As the name implies, Google Puppeteer meaning it was developed by Google and is maintained by Google. Puppeteer is just one of the amazing web tools Google has developed.

Website: https://developers.google.com/web/tools/puppeteer

Installation

Puppeteer is useful not only in Node JS world but also in other languages like Python.

In this writeup, I will show you how install puppeteer with Node JS via npm (node package manager).

Navigate to your project directory in a command prompt window and type the command below as shown from npmjs.com:

Puppeteer will be downloaded and installed in your local machine. This requires internet and has a size of about 280 MB on windows.

Downloading Puppeteer may take some time and you will get notified when it is complete. 

Make sure you install this in your project directory since it may or may not be installed globally (no idea!).

More about installation can be read on: https://www.npmjs.com/package/puppeteer

To check if installation was successful, navigate to the directory where you installed Puppeteer in a command window and type the command below:


As you can see, the command above checks the version of puppeteer installed which is v12.18.4 installed in my computer as of now. You may actually have an update installed in your computer.

Finally! guys, we are now set and ready to use Puppeteer.

Watch out for our next tutorial as we shall use puppeteer to do all that was mentioned at the beginning of this tutorial.

Thank you for reading.


Comments

Popular posts from this blog

Introduction to flask

Hello. Welcome to another session on this platform. If you are new here, please do checkout our previous articles on python programming language and stay excited on this session because we are entering into one of python’s web-based application called flask. In this article, we are going to see the following What is flask Prequistes Installation of flask in python Some of flask template engine. What is flask? Flask is one of python-based framework which is used to create web applications. Flight is a very light web framework. During installation, flask comes with pre-installed modules and functions which are used to backup your own web applications. Flask is very easy to understand and perfect go-to for beginners and with flask, a web server can run in less than 3 lines of code. Prequistes Before learning flask, we recommend the reader to have a basic mastery of python concepts. Installation of flask  Before installing flask, we have to checked if python has been installed or. If n...

How to generate random numbers using NumP1

Hello. Welcome to another edition on this platform. For more better understanding, do checkout our YouTube channel to get the video tutorial. In this article of today, we are going to see how to generate random numbers using any of the following methods: Generating a random number Generating a random float and integer Generating random number arrays Generating random number from an array What is a random number? This is a number which cannot be predicted before its occurrence. This number might not different every time. Programmatically, they are two categories of random numbers:     Pseudo-Random numbers       True Random numbers. Just as programs which are written by programmers are a set of instructions, we must follow an algorithm to generate random numbers. Random numbers which are generated using an algorithm are called Pseudo-Random numbers. To generate a true random number, it is important to get the data from sources such as the keyboards, mou...

Introduction to Django

Hello. Welcome to another session on this platform. If you are new here, please do checkout our previous articles on python programming language and stay excited on this session. we are entering into one of python’s application called Django. In this article, we are going to discuss the following: What is Django Why must we use Django  A brief history of Django Installation of Django Popularity of Django What is Django? Python has so many framework application and Django happen to be one of them. Being a python-based-framework, it is used to quickly create web applications.  When building websites, django provides similar ready-made components to handle user authentication, forms, a way to upload components. Why use django? Django is very fast. It takes applications from concept to applications very quickly Django has thousand available packages in it when it is installed. With django, we can launch web applications is a matter of hours. Django is a highly is secured and helps...