Skip to main content

A lightweight two-engine browser automation module built on CDP — no Playwright, no Puppeteer

Project description

ricibrowser

A lightweight two-engine browser automation module built entirely on the Chrome DevTools Protocol (CDP). No Playwright, no Puppeteer, no selenium.

Engines

Engine Use case Technology
Lightpanda (fast path) crawl, recon, endpoint discovery, non-JS-heavy targets Zig-based headless engine, CDP at ws://127.0.0.1:9222
CDP-Chrome (thorough path) DAST, JS-heavy targets, auth flows, anti-bot Custom CDP client driving the user's real installed Chrome

Install

pip install ricibrowser

# For the fast path (optional):
bash scripts/install_lightpanda.sh
lightpanda serve --host 127.0.0.1 --port 9222

# For the thorough path:
# Just have Google Chrome installed on your system.

Quick start

import asyncio
from ricibrowser import Engine, EngineConfig

async def main():
    engine = Engine(EngineConfig())

    # Fast path (Lightpanda) — crawl/recon
    page = await engine.fast_browse("https://example.com")
    print(f"Title: {page.title}")
    print(f"Text: {page.text[:200]}")
    print(f"Links: {len(page.links)}")

    # Thorough path (CDP-Chrome) — DAST/auth flows
    session = await engine.create_session()
    await session.navigate("https://example.com/login")
    await session.fill("#username", "admin")
    await session.fill("#password", "pass")
    await session.click("#login-btn")

    # Cookies persist across sessions via CookieJar
    await session.navigate("https://example.com/dashboard")  # authenticated!

    # JS evaluation in isolated world (never Runtime.enable on main world)
    count = await session.evaluate("document.querySelectorAll('script').length")

    # Network capture (opt-in, off by default)
    engine2 = Engine(EngineConfig(debug_network=True))
    session2 = await engine2.create_session()
    # ... browse ...
    flows = engine2.network.to_dict()

    await engine.close()

asyncio.run(main())

Stealth

  • navigator.webdriver suppressed via --disable-blink-features=AutomationControlled (Blink-level, not JS injection)
  • Uses the user's real installed Chrome (not bundled Chromium) — TLS/JA3 fingerprint matches a real Chrome release
  • Never calls Runtime.enable on the main world — isolated worlds only
  • Console.enable off by default — only enabled in explicit debug mode
  • Network.enable off by default — known CDP detection vector

Architecture

See ARCHITECTURE.md for the full design.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ricibrowser-0.2.1.tar.gz (44.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ricibrowser-0.2.1-py3-none-any.whl (47.5 kB view details)

Uploaded Python 3

File details

Details for the file ricibrowser-0.2.1.tar.gz.

File metadata

  • Download URL: ricibrowser-0.2.1.tar.gz
  • Upload date:
  • Size: 44.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ricibrowser-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1f1cc94464d710e6ed56d21ba7f5ba0447f2e7321c9775f377f8c7dbc9f13122
MD5 1dbb2964249241863b8d45685ac195b0
BLAKE2b-256 e3addcf4de7f50d5561b62a2d249c0470fab5d8d49c3e0ec6a12a000e71fc44e

See more details on using hashes here.

File details

Details for the file ricibrowser-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: ricibrowser-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 47.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ricibrowser-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a47a1d7a1b2807df04cfcd51b924b188f93cbc6fd6285355930adae15b170db8
MD5 e17315432a2e4b2dd7ed54c12cd9ff8b
BLAKE2b-256 fd76601f70f7a6397d47e2a50ca5c7cf823ac89aadc31dfde2339733c1c0954a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page