npm install antibotbrowser
const antibotbrowser = require("antibotbrowser");
antibrowser = antibotbrowser.startbrowser();
const antibotbrowser = require("antibotbrowser");
const puppeteer = require("puppeteer");
(async () => {
const antibrowser = await antibotbrowser.startbrowser();
const browser = await puppeteer.connect({
browserWSEndpoint: antibrowser.websokcet,
});
// Normal use from now on
const page = await browser.newPage();
await page.setViewport({ width: 0, height: 0 });
page.goto("https://google.com");
})();
1-
const antibotbrowser = require("antibotbrowser");
const puppeteer = require("puppeteer");
(async () => {
const antibrowser = await antibotbrowser.startbrowser(); // We start the browser with default settings. Port: 9222 Url: google.com
const browser = await puppeteer.connect({
browserWSEndpoint: antibrowser.websokcet,
}); // We connect the launched browser to puppeteer. With the variable we created above, it gives the web socket url to puppetter with antibotbrowser.websocket .
// Normal use from now on
const page = await browser.newPage();
await page.setViewport({ width: 0, height: 0 });
page.goto("https://google.com");
})();
antibotbrowser.startbrowser(port, url);
// port: The debugging port is the debugging port of the chromium browser. There can be 1 browser on the same port number, so you can add it as an argument. By default, if you enter nothing, the port is 9222.
// url: The first page address on browser startup. If you leave it blank, it defaults to google.com.
// Examples
antibotbrowser.startbrowser(9223, "https://github.com");
antibotbrowser.startbrowser(9222, "https://google.com");
// note do not start 2 scanners on the same port!!!