Skip to main content

Browser automation client — local Chrome via Patchright or remote via CDP

Project description

o-browser

Python async browser automation client built on Patchright.

Install

pip install o-browser

Usage

from o_browser import BrowserClient, RemoteBrowser

# Local headless browser
async with BrowserClient() as browser:
    await browser.goto("https://example.com")
    text = await browser.get_text()

# Persistent Chrome profile (cookies survive between runs)
async with BrowserClient(profile_path="~/.config/browser/linkedin") as browser:
    await browser.goto("https://linkedin.com")

# With recording (HAR + video)
async with BrowserClient(record=True) as browser:
    await browser.goto("https://example.com")

# Interactive (opens browser window, waits for user to close)
async with BrowserClient(interactive=True) as browser:
    await browser.wait_closed()

# Connect to remote Chrome (e.g. o-browser-full)
# RemoteBrowser auto-creates a session via POST /api/sessions if none active.
async with RemoteBrowser("http://host:8080", workflow="my-app") as browser:
    await browser.goto("https://example.com")

# Disable auto-session if you manage sessions yourself
async with RemoteBrowser("http://host:8080", auto_session=False) as browser:
    ...

Features

  • Headless and headful modes
  • Persistent Chrome profiles
  • HAR + video recording (HAR captured Python-side, survives the user closing the window in interactive mode)
  • Proxy support
  • Cookie management
  • CDP connection to existing Chrome instances
  • Anti-detection via Patchright

Site adapters (plugins)

Site-specific scrapers are separate distributions, not bundled in core. Each registers in the o_browser.sites entry-point group and is discovered at runtime:

from o_browser import load_site, available_sites

available_sites()                       # -> ['vivatech', ...] (installed adapters)
VivaTechClient = load_site("vivatech")   # pip install o-browser-vivatech

Related

For a full remote browser service with VNC, session management, and recording, see o-browser-full.

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

o_browser-0.4.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

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

o_browser-0.4.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file o_browser-0.4.0.tar.gz.

File metadata

  • Download URL: o_browser-0.4.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for o_browser-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1d58ce1b7ecb6273c9b8338349593aa42ce9e7e1f75c2104d5e111c7e597dc0b
MD5 9313c19728a0f394074dbc7ef9b6f119
BLAKE2b-256 e4702e3839424645d16e4086ee0adc7956fcb2d77eb6f4bb5d7ffcc77325223c

See more details on using hashes here.

Provenance

The following attestation bundles were made for o_browser-0.4.0.tar.gz:

Publisher: publish.yml on otomata-tech/o-browser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file o_browser-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: o_browser-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for o_browser-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7594e2f4b884fb422bfedbe3000fc19ed05d9ae63541b2537828f689eae0b90c
MD5 c99b339911b2f56a3816b3e643d43b31
BLAKE2b-256 d37e178774ff4b62b42206adc509a872a427f1c63c9a5774c1805524fe74ff6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for o_browser-0.4.0-py3-none-any.whl:

Publisher: publish.yml on otomata-tech/o-browser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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