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: 4 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.


## Getting Started

### Installation

You can install **XDriver** using `pip`:

```shell
$ pip install x_driver
```

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