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)
- Host: GitHub
- URL: https://github.com/arjun-sha/xdriver
- Owner: arjun-sha
- License: apache-2.0
- Created: 2025-05-20T08:10:34.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2025-05-23T14:17:06.000Z (4 months ago)
- Last Synced: 2025-06-15T05:03:25.367Z (4 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.
## 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
![]()
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, expectasync 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.
---