Audits¶
Audits domain allows investigation of page violations and possible improvements.
This CDP domain is experimental.
Types¶
There are no types in this module.
Commands¶
Each command is a generator function. The return
type Generator[x, y, z] indicates that the generator
yields arguments of type x, it must be resumed with
an argument of type y, and it returns type z. In
this library, types x and y are the same for all
commands, and z is the return type you should pay attention
to. For more information, see
Getting Started: Commands.
-
cdp.audits.get_encoded_response(request_id, encoding, quality=None, size_only=None)¶ Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.
Parameters: - request_id (
RequestId) – Identifier of the network request to get content for. - encoding (
str) – The encoding to use. - quality (
Optional[float]) – (Optional) The quality of the encoding (0-1). (defaults to 1) - size_only (
Optional[bool]) – (Optional) Whether to only return the size information (defaults to false).
Return type: Generator[Dict[str,Any],Dict[str,Any],Tuple[Optional[str],int,int]]Returns: A tuple with the following items:
- body - (Optional) The encoded body as a base64 string. Omitted if sizeOnly is true.
- originalSize - Size before re-encoding.
- encodedSize - Size after re-encoding.
- request_id (
Events¶
There are no events in this module.