Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.18 KB

File metadata and controls

43 lines (30 loc) · 1.18 KB

Check HTML element exists or not

Check HTML element exists or not in multiple URLs using puppeteer.

Getting Started

Installation

I use Puppeteer,https and puppeteer-cluster in project, run:

npm i puppeteer
# or "yarn add puppeteer"
npm i puppeteer-cluster
# or "yarn add puppeteer-cluster"

Note: When you install Puppeteer, it downloads a recent version of Chromium (~170MB Mac, ~282MB Linux, ~280MB Win) that is guaranteed to work with the API. To skip the download, or to download a different browser, see Environment variables.

Usage

Please replace the requests variable as per your requirement. It is a Array of String its mainly content URLs.

const requests = [
  'https://www.worldpranichealing.com/en/wesak/benefits-of-meditating-during-wesak/',
  'https://www.worldpranichealing.com/en/wesak/a-ceremony-in-the-himalaya/',
];

Example

To run the repo: clone the repo, npm install on the package, and run the app:

git clone https://github.com/aotr/Check-HTML-element-exists-or-not.git
cd Check-HTML-element-exists-or-not
npm install
node app.js