Chrome Debugging Protocol client
Project description
CProto is a Debugging Protocol client that supports Chrome, Chromium and Blink based browsers.
CProto provides you an advanced interface to interact with Headless Chrome instance from your Python code. It’s greatly useful for automated testing, debugging, profiling or even complicated page crawling.
This project is under development. More updates are coming soon.
How does API look like?
CProto interface is fully compatible with official Chrome Debugging Protocol API.
from cproto import CProto
# Create CProto instance & connect to Chrome Headless over CDP
cp = CProto(host='127.0.0.1', port=9222)
# Navigate to https://github.com
cp.Page.navigate(url='https://github.com')
Running Chrome Headless with Docker
While Chrome Headless mode is only available for Linux (MacOS coming soon), you could use Docker to run Headless mode on any major OS.
# Build Docker image for Chrome Headless:
$ docker build -t headless .
# Run Docker Chrome Headless mode container with port 9222 being proxied to the host machine:
$ docker run --rm -it --cap-add=SYS_ADMIN -p 9222:9222 headless
# That's all here. Chrome Debugging interface is now listening for connections.
# You could check it out by opening this link in your browser – http://localhost:9222.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file cproto-0.1.4.tar.gz
.
File metadata
- Download URL: cproto-0.1.4.tar.gz
- Upload date:
- Size: 40.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30d58638fb6f5aa0c6463e858dcdf41613008beaab0e161919fc453a2711fbb8 |
|
MD5 | a00de1c43515d606b130c718d093e06a |
|
BLAKE2b-256 | 30dd3618f025d208fa82989d90772a8149802c0897d120dbff6ccd01a8e96c0b |
File details
Details for the file cproto-0.1.4-py2.py3-none-any.whl
.
File metadata
- Download URL: cproto-0.1.4-py2.py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fc09efcc92fce09babaef08e43d9aa367a71368634a94204defc6fef42aeeaf |
|
MD5 | c5517eaa392e0e79dbb285cda37daaf5 |
|
BLAKE2b-256 | f0db9ca08b7c221316bb0d8b54e93be233845b2a1ad1f15e5215c0d328ec4b17 |