aotr / Check-HTML-element-exists-or-not

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%