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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file o_browser-0.3.1.tar.gz.
File metadata
- Download URL: o_browser-0.3.1.tar.gz
- Upload date:
- Size: 25.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b21160c19bf145566b271e9fc2f2753af368d6157675035770f8070fbdcc8f6f
|
|
| MD5 |
9a596d7cce7ba807bded348f7e22e8c6
|
|
| BLAKE2b-256 |
d6a65dfc855a2ab1ed722bb5b2bd864c2cad6a14562029198140a10e0c2399f4
|
File details
Details for the file o_browser-0.3.1-py3-none-any.whl.
File metadata
- Download URL: o_browser-0.3.1-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e1fdf7d59e9577edca8cc3a6eb2f5d7ed9a4f251a36e1fa83133f9946c85a19
|
|
| MD5 |
690832a5cc1589469a7c36b69eb53ec3
|
|
| BLAKE2b-256 |
22b6df96c5c11a7e26abb9ebea274a706e19bca887f0bd841cde2ebb2258e6e6
|