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
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"pip install -e .python -m playwright install chromiumfrom 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)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/selenium_example.pyexamples/playwright_example.py
- This toolkit reduces detection surface, but sites may still detect automation. Use responsibly.
- Keep dependencies updated for best results.
MIT