Check HTML element exists or not in multiple URLs using puppeteer.
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.
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/',
];
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