Browsinator
Browsinator is a Python library for programmatically controlling and interacting with a web browser using the Chrome DevTools Protocol.
Installation
To install Browsinator, you'll need Python 3.6 or later. You can install it using pip:
pip install browsinator
Usage
Here's a basic example of how to use Browsinator:
from browsinator import Browser
Browser.start() # Start Chrome or ...
Browser.start_brave() # Start Brave
browser = Browser()
Navigate to a URL
browser.load("https://example.com", wait=True)
Run JavaScript
result = browser.run_script("document.title")
print(f"Page title: {result}")
Monitor network traffic
browser.match_network("api/data", lambda req, res, data: print(f"API data: {data}"))
browser.monitor_network()
Run raw debug methods
For example calling Network.getResponseBody with a specific request ID:
result = browser.send_command("Network.getResponseBody", {"requestId": 1})
print(f"Response body: {result}")
Simulate user input
browser.keyboard_type("Hello, World!")
browser.keyboard_press_enter()
browser.mouse_click_selector("#submit-button")
Close the browser
browser.close()
Custom Chrome startup
You can also customize the Chrome startup:
# Start Chrome with custom options
Browser.start(
path="/path/to/chrome", # Custom Chrome executable path
minimized=False, # Start Chrome in normal window (not minimized)
debug_port=9223 # Use a custom debugging port
)
browser = Browser(debug_port=9222)
Metadata
Release files for browsinator 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| browsinator-0.1.2.tar.gz | 5.5 kB | Without provenance | Details for browsinator-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| browsinator-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for browsinator-0.1.2-py3-none-any.whl |
Total release size: 10.5 kB
Release files / browsinator-0.1.2.tar.gz
| Download URL | browsinator-0.1.2.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e1adfc174eb6ae4e5b73dc6581411801dd8ac9babcbb52b3c16575e9ebe054a
|
|
BLAKE2b-256 checksum How to use checksums |
1423f0125d5000587f8e6ff09fe66b0fc725a37d6d8bcbdd8c1246fc5577dbe9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.6
|
Release files / browsinator-0.1.2-py3-none-any.whl
| Download URL | browsinator-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ba3755acbb3dc5c8d426f2334447636125b055b377b700c8a989b516c1839d6
|
|
BLAKE2b-256 checksum How to use checksums |
7de4d940638b9d0716a3eff7c2534286538e141f38cf06e5e27b91f9a44434a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.6
|
Security for browsinator 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.