An open API service indexing awesome lists of open source software.

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)

Awesome Lists containing this project

README

          



🎭XDriver


PyPI version


Python Version


Playwright Version








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


Logo

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.

---


πŸ’¬ Let's Connect












---

## 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 |