https://github.com/arjun-sha/xdriver
Scrape the Web Without Getting Blocked β Bot bypassing tool for Playwright (Python)
https://github.com/arjun-sha/xdriver
anti-bot automation browser-automation cloudflare cloudflare-solver cloudflare-turnstile datadome kasada perimeterx playwright undetactable web-scraping
Last synced: about 2 months ago
JSON representation
Scrape the Web Without Getting Blocked β Bot bypassing tool for Playwright (Python)
- Host: GitHub
- URL: https://github.com/arjun-sha/xdriver
- Owner: arjun-sha
- License: apache-2.0
- Created: 2025-05-20T08:10:34.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-05-23T14:17:06.000Z (about 1 year ago)
- Last Synced: 2025-06-15T05:03:25.367Z (12 months ago)
- Topics: anti-bot, automation, browser-automation, cloudflare, cloudflare-solver, cloudflare-turnstile, datadome, kasada, perimeterx, playwright, undetactable, web-scraping
- Language: JavaScript
- Homepage:
- Size: 2.25 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Scrape the Web Without Getting Blocked β Playwright Anti-Block Patch Tool β€οΈ
XDriver patches Playwright with a single command to bypass anti-bot systems and make your scraping sessions block-free. It modifies driver, CDP connections and python wrapper, helping you avoid detection.
## Features (v1.0.0)
### **Undetectable Browser for Web Scraping**
- β
Runs in an isolated Service Worker scope for maximum stealth.
- β
Stealth-hardened Playwright browser at both JavaScript and C-level.
- β
Effectively bypasses anti-bot systems such as Cloudflare WAF, Turnstile, Datadome, Kasada, and more.
- β
Evades detection of headless mode execution.
### **Advanced Playwright Leak Prevention**
- β
CDP Connection Cloaking β Hides detection when Playwright connects via CDP.
- β
Script Injection Concealment β Removes traces of __pwInitScripts and add_init_script().
- β
Developer Tools Evasion β Undetectable even against vendors like Kasada.
- β
WebRTC Leak Protection β Prevents IP leaks through WebRTC channels.
- β
Binding & Exposure Hardening β Patches __pwBinding and exposeFunctionLeak.
- β
Runtime Leak Fix β Resolves detection from runtimeEnable behavior.
## Installation Guide
> π **System Requirements**
>
> python >= 3.8.0
>
> Playwright Version - 1.52.0
>
>
## Getting Started
### Installation
You can install **XDriver** using `pip`:
```shell
$ pip install git+https://github.com/arjun-sha/XDriver.git@v1.0.1
```
for windows run this before installing
```shell
set PYTHONUTF8=1
```
### Activate XDriver
To patch your Playwright installation for stealth scraping, run:
```shell
$ x_driver activate
```
This command modifies Playwrightβs source code to bypass common bot detection systems, making your scraping scripts more undetectable.
---
### Running playwright
Once XDriver is activated, you can **run your Playwright scripts just like you normally would**βno additional changes needed.
Here's a basic example:
```python
import asyncio
import re
from playwright.async_api import Playwright, async_playwright, expect
async def run(playwright: Playwright) -> None:
browser = await playwright.chromium.launch(headless=False)
context = await browser.new_context()
page = await context.new_page()
await page.goto("http://example.com/")
await context.close()
await browser.close()
async def main() -> None:
async with async_playwright() as playwright:
await run(playwright)
asyncio.run(main())
```
XDriver ensures your Playwright instance is patched for stealth, allowing you to scrape without getting blocked
---
### Deactivate XDriver
To restore Playwright to its original state, run:
```shell
$ x_driver deactivate
```
This safely reverts all changes made by XDriver, returning Playwright to its default configuration.
---
---
## Performance
| Test | Status |
| ----------------------------------------------------------------------------- | ------------------- |
| [**CreepJS**](https://abrahamjuliot.github.io/creepjs/) | β
100% Anonymous |
| [**Cloudflare WAF**](https://www.cloudflare.com/zero-trust/interactive-demo/) | β
Passed |
| [**Rebrowser Bot Detector**](https://bot-detector.rebrowser.net/) | β
Passed all tests |
| [**Cloudflare Turnstile**](https://nopecha.com/demo/turnstile) | β
Passed |
| [**BrowserScan**](https://browserscan.net/) | β
87% |
| [**Cloudflare Interstitial**](https://nopecha.com/demo) | β
Passed |
| [**Kasada**](https://www.kasada.io/) | β
Passed |
| **Datadome Interstitial** | β
Passed |
| **Perimeter X** | β
Passed |
| **Imperva** ([ticketmaster.com](https://www.ticketmaster.com/)) | β
Passed |
| [**Fingerprints.com**](https://fingerprint.com/products/bot-detection/) | β
Passed |
| [**IP-API Bot Detection**](https://ip-api.com/) | β
Passed |
| [**Whoer.net**](https://whoer.net/) | β
High Anonymity |
| [**IPQualityScore Bot Detection**](https://www.ipqualityscore.com/) | β
Passed |
| [**TLS Fingerprint Detection**](https://tls.browserleaks.com/) | β
No Anomalies |
| [**JA3er Bot Detector**](https://ja3er.com/) | β
No Tracking |
| [**AmIUnique**](https://amiunique.org/fp) | β
No Unique |
| [**Cover Your Tracks (EFF)**](https://coveryourtracks.eff.org/) | β
Strong Protection |