You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

antibotbrowser

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antibotbrowser

Opening Chromium opens a real browser without bot validations in automated systems like Puppetter. To avoid problems in places like Cloudflare

2.0.0
latest
npmnpm
Version published
Weekly downloads
54
-38.64%
Maintainers
0
Weekly downloads
 
Created
Source

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

})();

FAQs

Package last updated on 12 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts