sapistudio/seleniumstealth

Installs: 35 504

Dependents: 3

Suggesters: 0

Security: 0

Stars: 16

Watchers: 2

Forks: 4

Open Issues: 3

Language:JavaScript

1.0.3 2022-01-10 20:04 UTC

This package is auto-updated.

Last update: 2024-05-11 01:42:48 UTC


README

A php package selenium-stealth to prevent detection.

As of now selenium-stealth only support Selenium Chrome/Chromium.

After using selenium-stealth you can prevent almost all selenium detections. There is a lot of guides on stackoverflow on How to prevent selenium detection but I can not find a single python package for it so I am just creating one after all we can't let the cats win. It can be seen as a re-implementation of JavaScript puppeteer-extra-plugin-stealth developed by @berstend.

Install

$ composer require sapistudio/seleniumstealth

Usage

For now , it can run with php-webdriver or laravel-panther client for php-webdriver

use Facebook\WebDriver\Remote\RemoteWebDriver;
use SapiStudio\SeleniumStealth\SeleniumStealth;

// Chrome
$driver = RemoteWebDriver::create($serverUrl, DesiredCapabilities::chrome());
$driver = (new SeleniumStealth(driver))->usePhpWebriverClient()->makeStealth();

for laravel panther

use Symfony\Component\Panther\Client;
use SapiStudio\SeleniumStealth\SeleniumStealth;

// Chrome
$driver = Client::createChromeClient();
$driver = (new SeleniumStealth(driver))->makeStealth();

After this you run your usual commands with the driver