Skip to main content

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


Download files

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

Source Distribution

cproto-0.1.8.tar.gz (40.7 kB view details)

Uploaded Source

Built Distribution

cproto-0.1.8-py2.py3-none-any.whl (43.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file cproto-0.1.8.tar.gz.

File metadata

  • Download URL: cproto-0.1.8.tar.gz
  • Upload date:
  • Size: 40.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cproto-0.1.8.tar.gz
Algorithm Hash digest
SHA256 2ca0908b7068032110c9f841bb74c527892c8536dcfa0e023c646b95c7e52c17
MD5 02a4948db0fa3c2bb84779f73e9bec7e
BLAKE2b-256 57ef060422216932bd167cf7e067e417cdeb88cb79c6c553023bf059c840d7c6

See more details on using hashes here.

File details

Details for the file cproto-0.1.8-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for cproto-0.1.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0c2196dc959f8b0a7454fd5721301a25eaaeb9549f6e034e306df41d55576ec9
MD5 8f3d3bfce3cc6a0416991edfa9ee4e82
BLAKE2b-256 3b539abf4c522bea105280846615cdeb52cf4d563448091ef26391d77be63bc9

See more details on using hashes here.

Supported by

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