Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anti-Detect Browser (Python)

Reusable toolkit to launch stealthy, anti-detect browser sessions for web scraping and automation. Focused on Selenium (Chromium-based) with optional Playwright adapter.

  • Fingerprint rotation (modern user-agents, language, timezone, viewport)
  • Stealth evasions (navigator.webdriver, WebGL, plugins, permissions, media devices)
  • Proxy support (HTTP/SOCKS, with/without auth)
  • Portable Chromium (via Playwright) + webdriver-manager for cross-OS driver matching

Install

From GitHub (recommended)

Add to requirements.txt:

git+https://github.com/<you>/antidetect-browser.git@v0.1.0

Or install directly:

pip install "git+https://github.com/<you>/antidetect-browser.git@v0.1.0"

Local dev

pip install -e .

Playwright Chromium (portable)

python -m playwright install chromium

Usage (Selenium)

from anti_detect_browser.selenium_adapter import launch_stealth_chromium
from anti_detect_browser.fingerprints.fingerprints import FingerprintProfile

fingerprint = FingerprintProfile.random_desktop()

with launch_stealth_chromium(
    fingerprint=fingerprint,
    proxy_url=None,
    headless=True,
    user_data_dir=None,
    # version_main and browser_executable_path optional
) as driver:
    driver.get("https://bot.sannysoft.com/")
    print(driver.title)

Usage (Playwright)

import asyncio
from anti_detect_browser.playwright_adapter import launch_stealth_chromium
from anti_detect_browser.fingerprints.fingerprints import FingerprintProfile

async def main():
    fp = FingerprintProfile.random_desktop()
    async with launch_stealth_chromium(fingerprint=fp, headless=True) as page:
        await page.goto("https://example.com")
        print(await page.title())

asyncio.run(main())

Examples

  • examples/selenium_example.py
  • examples/playwright_example.py

Notes

  • This toolkit reduces detection surface, but sites may still detect automation. Use responsibly.
  • Keep dependencies updated for best results.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages