antibotbrowser

2.0.0 • Public • Published

Usage

1 - First let's start by installing the module

npm install antibotbrowser

2 - Let's include our module in our project

const antibotbrowser = require("antibotbrowser");

3 - And let's run our browser

  var antibrowser = await antibotbrowser.startbrowser(9222);

  //OR HİDE MOD (headless / no-sandbox) Mode Open browser
  
  var antibrowser = await antibotbrowser.startbrowser_hide(9222);

END - Connect the browser to puppeteer with websocket

const antibotbrowser = require("antibotbrowser");
const puppeteer = require('puppeteer');

(async () => { 

   const antibrowser = await antibotbrowser.startbrowser(9222);  

    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")

})();

Example uses

1-

const antibotbrowser = require("antibotbrowser");
const puppeteer = require('puppeteer');
(async () => { 

   const antibrowser = await antibotbrowser.startbrowser(9222);  // We start the browser with settings Port: 9222

    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")

})();

Readme

Keywords

none

Package Sidebar

Install

npm i antibotbrowser

Weekly Downloads

75

Version

2.0.0

License

ISC

Unpacked Size

4.21 kB

Total Files

3

Last publish

Collaborators

  • nokersoftware