code stringlengths 66 870k | docstring stringlengths 19 26.7k | func_name stringlengths 1 138 | language stringclasses 1
value | repo stringlengths 7 68 | path stringlengths 5 324 | url stringlengths 46 389 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
def remove_script_to_evaluate_on_new_document(
identifier: str,
) -> Command[Response]:
"""
Creates a command to remove a script that was added to be evaluated on new documents.
Args:
identifier (str): Identifier of the script to remove.
Returns:
Com... |
Creates a command to remove a script that was added to be evaluated on new documents.
Args:
identifier (str): Identifier of the script to remove.
Returns:
Command[Response]: Command object to remove a script.
| remove_script_to_evaluate_on_new_document | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def set_bypass_csp(enabled: bool) -> Command[Response]:
"""
Creates a command to toggle bypassing page CSP.
Args:
enabled (bool): Whether to bypass page CSP.
Returns:
Command[Response]: Command object to toggle bypassing page CSP.
"""
params = Se... |
Creates a command to toggle bypassing page CSP.
Args:
enabled (bool): Whether to bypass page CSP.
Returns:
Command[Response]: Command object to toggle bypassing page CSP.
| set_bypass_csp | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def set_document_content(frame_id: str, html: str) -> Command[Response]:
"""
Creates a command to set the document content of a frame.
Args:
frame_id (str): Frame ID to set the document content for.
html (str): HTML content to set.
Returns:
Command[R... |
Creates a command to set the document content of a frame.
Args:
frame_id (str): Frame ID to set the document content for.
html (str): HTML content to set.
Returns:
Command[Response]: Command object to set the document content.
| set_document_content | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def set_intercept_file_chooser_dialog(enabled: bool) -> Command[Response]:
"""
Creates a command to set whether to intercept file chooser dialogs.
Args:
enabled (bool): Whether to intercept file chooser dialogs.
Returns:
Command[Response]: Command object to set ... |
Creates a command to set whether to intercept file chooser dialogs.
Args:
enabled (bool): Whether to intercept file chooser dialogs.
Returns:
Command[Response]: Command object to set file chooser dialog interception.
| set_intercept_file_chooser_dialog | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def set_lifecycle_events_enabled(enabled: bool) -> Command[Response]:
"""
Creates a command to enable/disable lifecycle events.
Args:
enabled (bool): Whether to enable lifecycle events.
Returns:
Command[Response]: Command object to enable/disable lifecycle event... |
Creates a command to enable/disable lifecycle events.
Args:
enabled (bool): Whether to enable lifecycle events.
Returns:
Command[Response]: Command object to enable/disable lifecycle events.
| set_lifecycle_events_enabled | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def add_compilation_cache(url: str, data: str) -> Command[Response]:
"""
Creates a command to add a compilation cache entry.
Experimental: This method is experimental and may be subject to change.
Args:
url (str): URL for which to add the compilation cache entry.
... |
Creates a command to add a compilation cache entry.
Experimental: This method is experimental and may be subject to change.
Args:
url (str): URL for which to add the compilation cache entry.
data (str): Base64-encoded data.
Returns:
Command[Respons... | add_compilation_cache | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def capture_snapshot(
format: Literal['mhtml'] = 'mhtml',
) -> Command[CaptureSnapshotResponse]:
"""
Creates a command to capture a snapshot of the page.
Experimental: This method is experimental and may be subject to change.
Args:
format (Literal['mhtml']): For... |
Creates a command to capture a snapshot of the page.
Experimental: This method is experimental and may be subject to change.
Args:
format (Literal['mhtml']): Format of the snapshot (only 'mhtml' is supported).
Returns:
Command[CaptureSnapshotResponse]: Command... | capture_snapshot | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def generate_test_report(message: str, group: Optional[str] = None) -> Command[Response]:
"""
Creates a command to generate a test report.
Experimental: This method is experimental and may be subject to change.
Args:
message (str): Message to be displayed in the report.
... |
Creates a command to generate a test report.
Experimental: This method is experimental and may be subject to change.
Args:
message (str): Message to be displayed in the report.
group (Optional[str]): Group label for the report.
Returns:
Command[Res... | generate_test_report | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def get_ad_script_ancestry_ids(
frame_id: str,
) -> Command[GetAdScriptAncestryIdsResponse]:
"""
Creates a command to get the ad script ancestry IDs for a given frame.
Experimental: This method is experimental and may be subject to change.
Args:
frame_id (str): ... |
Creates a command to get the ad script ancestry IDs for a given frame.
Experimental: This method is experimental and may be subject to change.
Args:
frame_id (str): ID of the frame to get ad script ancestry IDs for.
Returns:
Command[GetAdScriptAncestryIdsRespo... | get_ad_script_ancestry_ids | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def get_app_id(
app_id: Optional[str] = None, recommended_id: Optional[str] = None
) -> Command[GetAppIdResponse]:
"""
Creates a command to get the app ID.
Experimental: This method is experimental and may be subject to change.
Args:
app_id (Optional[str]): App ... |
Creates a command to get the app ID.
Experimental: This method is experimental and may be subject to change.
Args:
app_id (Optional[str]): App ID for verification.
recommended_id (Optional[str]): Recommended app ID.
Returns:
Command[GetAppIdRespons... | get_app_id | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def get_origin_trials(frame_id: str) -> Command[GetOriginTrialsResponse]:
"""
Creates a command to get origin trials for a given origin.
Experimental: This method is experimental and may be subject to change.
Args:
frame_id (Optional[str]): Frame ID to get trials for.
... |
Creates a command to get origin trials for a given origin.
Experimental: This method is experimental and may be subject to change.
Args:
frame_id (Optional[str]): Frame ID to get trials for.
Returns:
Command[GetOriginTrialsResponse]: Command object to get orig... | get_origin_trials | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def get_permissions_policy_state(
frame_id: str,
) -> Command[GetPermissionsPolicyStateResponse]:
"""
Creates a command to get the permissions policy state.
"""
params = GetPermissionsPolicyStateParams(frameId=frame_id)
return Command(method=PageMethod.GET_PERMISSIONS... |
Creates a command to get the permissions policy state.
| get_permissions_policy_state | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def get_resource_content(
frame_id: str,
url: str,
) -> Command[GetResourceContentResponse]:
"""
Creates a command to get the resource content.
"""
params = GetResourceContentParams(frameId=frame_id, url=url)
return Command(method=PageMethod.GET_RESOURCE_CONTE... |
Creates a command to get the resource content.
| get_resource_content | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def produce_compilation_cache(
scripts: list[CompilationCacheParams],
) -> Command[Response]:
"""
Creates a command to produce a compilation cache entry.
"""
params = ProduceCompilationCacheParams(scripts=scripts)
return Command(method=PageMethod.PRODUCE_COMPILATION_C... |
Creates a command to produce a compilation cache entry.
| produce_compilation_cache | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def screencast_frame_ack(
session_id: str,
) -> Command[Response]:
"""
Creates a command to acknowledge a screencast frame.
"""
params = ScreencastFrameAckParams(sessionId=session_id)
return Command(method=PageMethod.SCREENCAST_FRAME_ACK, params=params) |
Creates a command to acknowledge a screencast frame.
| screencast_frame_ack | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def search_in_resource(
frame_id: str,
url: str,
query: str,
case_sensitive: Optional[bool] = None,
is_regex: Optional[bool] = None,
) -> Command[SearchInResourceResponse]:
"""
Creates a command to search for a string in a resource.
"""
params ... |
Creates a command to search for a string in a resource.
| search_in_resource | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def set_ad_blocking_enabled(
enabled: bool,
) -> Command[Response]:
"""
Creates a command to set ad blocking enabled.
"""
params = SetAdBlockingEnabledParams(enabled=enabled)
return Command(method=PageMethod.SET_AD_BLOCKING_ENABLED, params=params) |
Creates a command to set ad blocking enabled.
| set_ad_blocking_enabled | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def set_font_families(
font_families: FontFamilies,
for_scripts: list[ScriptFontFamilies],
) -> Command[Response]:
"""
Creates a command to set font families.
"""
params = SetFontFamiliesParams(fontFamilies=font_families, forScripts=for_scripts)
return Command... |
Creates a command to set font families.
| set_font_families | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def set_font_sizes(
font_sizes: FontSizes,
) -> Command[Response]:
"""
Creates a command to set font sizes.
"""
params = SetFontSizesParams(fontSizes=font_sizes)
return Command(method=PageMethod.SET_FONT_SIZES, params=params) |
Creates a command to set font sizes.
| set_font_sizes | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def set_prerendering_allowed(
allowed: bool,
) -> Command[Response]:
"""
Creates a command to set prerendering allowed.
"""
params = SetPrerenderingAllowedParams(allowed=allowed)
return Command(method=PageMethod.SET_PRERENDERING_ALLOWED, params=params) |
Creates a command to set prerendering allowed.
| set_prerendering_allowed | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def set_rph_registration_mode(
mode: AutoResponseMode,
) -> Command[Response]:
"""
Creates a command to set the RPH registration mode.
"""
params = SetRPHRegistrationModeParams(mode=mode)
return Command(method=PageMethod.SET_RPH_REGISTRATION_MODE, params=params) |
Creates a command to set the RPH registration mode.
| set_rph_registration_mode | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def set_spc_transaction_mode(
mode: AutoResponseMode,
) -> Command[Response]:
"""
Creates a command to set the SPC transaction mode.
"""
params = SetSPCTransactionModeParams(mode=mode)
return Command(method=PageMethod.SET_SPC_TRANSACTION_MODE, params=params) |
Creates a command to set the SPC transaction mode.
| set_spc_transaction_mode | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def set_web_lifecycle_state(
state: WebLifecycleState,
) -> Command[Response]:
"""
Creates a command to set the web lifecycle state.
"""
params = SetWebLifecycleStateParams(state=state)
return Command(method=PageMethod.SET_WEB_LIFECYCLE_STATE, params=params) |
Creates a command to set the web lifecycle state.
| set_web_lifecycle_state | python | autoscrape-labs/pydoll | pydoll/commands/page_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/page_commands.py | MIT |
def add_binding(name: str, execution_context_name: Optional[str] = None) -> Command[Response]:
"""
Creates a command to add a JavaScript binding.
Args:
name (str): Name of the binding to add.
execution_context_name (Optional[str]): Name of the execution context to bind t... |
Creates a command to add a JavaScript binding.
Args:
name (str): Name of the binding to add.
execution_context_name (Optional[str]): Name of the execution context to bind to.
Returns:
Command[Response]: Command object to add a JavaScript binding.
| add_binding | python | autoscrape-labs/pydoll | pydoll/commands/runtime_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/runtime_commands.py | MIT |
def await_promise(
promise_object_id: str,
return_by_value: Optional[bool] = None,
generate_preview: Optional[bool] = None,
) -> Command[AwaitPromiseResponse]:
"""
Creates a command to await a JavaScript promise and return its result.
Args:
promise_object... |
Creates a command to await a JavaScript promise and return its result.
Args:
promise_object_id (str): ID of the promise to await.
return_by_value (Optional[bool]): Whether to return the result by value instead
of reference.
generate_preview (Optional... | await_promise | python | autoscrape-labs/pydoll | pydoll/commands/runtime_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/runtime_commands.py | MIT |
def call_function_on( # noqa: PLR0913, PLR0917
function_declaration: str,
object_id: Optional[str] = None,
arguments: Optional[list[CallArgument]] = None,
silent: Optional[bool] = None,
return_by_value: Optional[bool] = None,
generate_preview: Optional[bool] = None,
... |
Creates a command to call a function with a given declaration on a specific object.
Args:
function_declaration (str): Declaration of the function to call.
object_id (Optional[str]): ID of the object to call the function on.
arguments (Optional[list[CallArgument]]): ... | call_function_on | python | autoscrape-labs/pydoll | pydoll/commands/runtime_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/runtime_commands.py | MIT |
def compile_script(
expression: str,
source_url: Optional[str] = None,
persist_script: Optional[bool] = None,
execution_context_id: Optional[str] = None,
) -> Command[CompileScriptResponse]:
"""
Creates a command to compile a JavaScript expression.
Args:
... |
Creates a command to compile a JavaScript expression.
Args:
expression (str): JavaScript expression to compile.
source_url (Optional[str]): URL of the source file for the script.
persist_script (Optional[bool]): Whether to persist the compiled script.
ex... | compile_script | python | autoscrape-labs/pydoll | pydoll/commands/runtime_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/runtime_commands.py | MIT |
def evaluate( # noqa: PLR0913, PLR0917, PLR0912
expression: str,
object_group: Optional[str] = None,
include_command_line_api: Optional[bool] = None,
silent: Optional[bool] = None,
context_id: Optional[str] = None,
return_by_value: Optional[bool] = None,
generate... |
Creates a command to evaluate a JavaScript expression in the global context.
Args:
expression (str): JavaScript expression to evaluate.
object_group (Optional[str]): Symbolic group name for the result.
include_command_line_api (Optional[bool]): Whether to include co... | evaluate | python | autoscrape-labs/pydoll | pydoll/commands/runtime_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/runtime_commands.py | MIT |
def get_properties(
object_id: str,
own_properties: Optional[bool] = None,
accessor_properties_only: Optional[bool] = None,
generate_preview: Optional[bool] = None,
non_indexed_properties_only: Optional[bool] = None,
) -> Command[GetPropertiesResponse]:
"""
Cr... |
Creates a command to get properties of a JavaScript object.
Args:
object_id (str): ID of the object to get properties for.
own_properties (Optional[bool]): Whether to return only own properties.
accessor_properties_only (Optional[bool]): Whether to return only acces... | get_properties | python | autoscrape-labs/pydoll | pydoll/commands/runtime_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/runtime_commands.py | MIT |
def global_lexical_scope_names(
execution_context_id: Optional[str] = None,
) -> Command[GlobalLexicalScopeNamesResponse]:
"""
Creates a command to retrieve names of variables from global lexical scope.
Args:
execution_context_id (Optional[str]): ID of the execution cont... |
Creates a command to retrieve names of variables from global lexical scope.
Args:
execution_context_id (Optional[str]): ID of the execution context to get scope
names from.
Returns:
Command[GlobalLexicalScopeNamesResponse]: Command object to get global ... | global_lexical_scope_names | python | autoscrape-labs/pydoll | pydoll/commands/runtime_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/runtime_commands.py | MIT |
def query_objects(
prototype_object_id: str,
object_group: Optional[str] = None,
) -> Command[QueryObjectsResponse]:
"""
Creates a command to query objects with a given prototype.
Args:
prototype_object_id (str): ID of the prototype object.
object_gro... |
Creates a command to query objects with a given prototype.
Args:
prototype_object_id (str): ID of the prototype object.
object_group (Optional[str]): Symbolic group name for the results.
Returns:
Command[QueryObjectsResponse]: Command object to query object... | query_objects | python | autoscrape-labs/pydoll | pydoll/commands/runtime_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/runtime_commands.py | MIT |
def release_object(
object_id: str,
) -> Command[Response]:
"""
Creates a command to release a JavaScript object.
Args:
object_id (str): ID of the object to release.
Returns:
Command[Response]: Command object to release an object.
"""
... |
Creates a command to release a JavaScript object.
Args:
object_id (str): ID of the object to release.
Returns:
Command[Response]: Command object to release an object.
| release_object | python | autoscrape-labs/pydoll | pydoll/commands/runtime_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/runtime_commands.py | MIT |
def release_object_group(
object_group: str,
) -> Command[Response]:
"""
Creates a command to release all objects in a group.
Args:
object_group (str): Name of the object group to release.
Returns:
Command[Response]: Command object to release an obje... |
Creates a command to release all objects in a group.
Args:
object_group (str): Name of the object group to release.
Returns:
Command[Response]: Command object to release an object group.
| release_object_group | python | autoscrape-labs/pydoll | pydoll/commands/runtime_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/runtime_commands.py | MIT |
def remove_binding(
name: str,
) -> Command[Response]:
"""
Creates a command to remove a JavaScript binding.
Args:
name (str): Name of the binding to remove.
Returns:
Command[Response]: Command object to remove a JavaScript binding.
"""
... |
Creates a command to remove a JavaScript binding.
Args:
name (str): Name of the binding to remove.
Returns:
Command[Response]: Command object to remove a JavaScript binding.
| remove_binding | python | autoscrape-labs/pydoll | pydoll/commands/runtime_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/runtime_commands.py | MIT |
def run_script( # noqa: PLR0913, PLR0917
script_id: str,
execution_context_id: Optional[str] = None,
object_group: Optional[str] = None,
silent: Optional[bool] = None,
include_command_line_api: Optional[bool] = None,
return_by_value: Optional[bool] = None,
genera... |
Creates a command to run a compiled script.
Args:
script_id (str): ID of the compiled script to run.
execution_context_id (Optional[str]): ID of the execution context to run the script in.
object_group (Optional[str]): Symbolic group name for the result.
... | run_script | python | autoscrape-labs/pydoll | pydoll/commands/runtime_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/runtime_commands.py | MIT |
def set_async_call_stack_depth(
max_depth: int,
) -> Command[Response]:
"""
Creates a command to set the async call stack depth.
Args:
max_depth (int): Maximum depth of async call stacks.
Returns:
Command[Response]: Command object to set async call s... |
Creates a command to set the async call stack depth.
Args:
max_depth (int): Maximum depth of async call stacks.
Returns:
Command[Response]: Command object to set async call stack depth.
| set_async_call_stack_depth | python | autoscrape-labs/pydoll | pydoll/commands/runtime_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/runtime_commands.py | MIT |
def set_custom_object_formatter_enabled(
enabled: bool,
) -> Command[Response]:
"""
Creates a command to enable or disable custom object formatters.
Args:
enabled (bool): Whether to enable custom object formatters.
Returns:
Command[Response]: Command... |
Creates a command to enable or disable custom object formatters.
Args:
enabled (bool): Whether to enable custom object formatters.
Returns:
Command[Response]: Command object to enable/disable custom object formatters.
| set_custom_object_formatter_enabled | python | autoscrape-labs/pydoll | pydoll/commands/runtime_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/runtime_commands.py | MIT |
def set_max_call_stack_size_to_capture(
size: int,
) -> Command[Response]:
"""
Creates a command to set the maximum call stack size to capture.
Args:
size (int): Maximum call stack size to capture.
Returns:
Command[Response]: Command object to set ma... |
Creates a command to set the maximum call stack size to capture.
Args:
size (int): Maximum call stack size to capture.
Returns:
Command[Response]: Command object to set max call stack size.
| set_max_call_stack_size_to_capture | python | autoscrape-labs/pydoll | pydoll/commands/runtime_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/runtime_commands.py | MIT |
def clear_cookies(browser_context_id: Optional[str] = None) -> Command[Response]:
"""
Generates a command to clear all browser cookies.
Args:
browser_context_id: Browser context ID (optional). Useful when working
with multiple contexts (e.g., multiple ... |
Generates a command to clear all browser cookies.
Args:
browser_context_id: Browser context ID (optional). Useful when working
with multiple contexts (e.g., multiple windows or tabs).
Returns:
Command: The CDP command to clear all cookies... | clear_cookies | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def clear_data_for_origin(origin: str, storage_types: str) -> Command[Response]:
"""
Generates a command to clear storage data for a specific origin.
Args:
origin: The security origin (e.g., "https://example.com").
storage_types: Comma-separated list of storage types to ... |
Generates a command to clear storage data for a specific origin.
Args:
origin: The security origin (e.g., "https://example.com").
storage_types: Comma-separated list of storage types to clear.
Possible values include: "cookies", "local_storage", "index... | clear_data_for_origin | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def clear_data_for_storage_key(storage_key: str, storage_types: str) -> Command[Response]:
"""
Generates a command to clear data for a specific storage key.
Args:
storage_key: The storage key for which to clear data.
Unlike origin, a storage key is a more spe... |
Generates a command to clear data for a specific storage key.
Args:
storage_key: The storage key for which to clear data.
Unlike origin, a storage key is a more specific identifier
that may include partition isolation.
storage_typ... | clear_data_for_storage_key | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def get_cookies(browser_context_id: Optional[str] = None) -> Command[GetCookiesResponse]:
"""
Generates a command to get all browser cookies.
Args:
browser_context_id: Browser context ID (optional). Useful when working
with multiple contexts (e.g., mul... |
Generates a command to get all browser cookies.
Args:
browser_context_id: Browser context ID (optional). Useful when working
with multiple contexts (e.g., multiple windows or tabs).
Returns:
Command: The CDP command to get all cookies, wh... | get_cookies | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def get_storage_key_for_frame(frame_id: str) -> Command[GetStorageKeyForFrameResponse]:
"""
Generates a command to get the storage key for a specific frame.
Storage keys are used to isolate data between different origins or
partitions in the browser.
Args:
frame_id:... |
Generates a command to get the storage key for a specific frame.
Storage keys are used to isolate data between different origins or
partitions in the browser.
Args:
frame_id: The ID of the frame for which to get the storage key.
Returns:
Command: The C... | get_storage_key_for_frame | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def get_usage_and_quota(origin: str) -> Command[GetUsageAndQuotaResponse]:
"""
Generates a command to get storage usage and quota information for an origin.
Useful for monitoring or debugging storage consumption of a site.
Args:
origin: The security origin (e.g., "https://e... |
Generates a command to get storage usage and quota information for an origin.
Useful for monitoring or debugging storage consumption of a site.
Args:
origin: The security origin (e.g., "https://example.com") for which to get information.
Returns:
Command: The ... | get_usage_and_quota | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def set_cookies(
cookies: list[CookieParam], browser_context_id: Optional[str] = None
) -> Command[Response]:
"""
Generates a command to set browser cookies.
Args:
cookies: list of Cookie objects to set.
browser_context_id: Browser context ID (optional). Usef... |
Generates a command to set browser cookies.
Args:
cookies: list of Cookie objects to set.
browser_context_id: Browser context ID (optional). Useful when working
with multiple contexts (e.g., multiple windows or tabs).
Returns:
... | set_cookies | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def track_cache_storage_for_origin(origin: str) -> Command[Response]:
"""
Generates a command to register an origin to receive notifications about changes
to its Cache Storage.
Cache Storage is primarily used by Service Workers to store resources for offline use.
Args:
... |
Generates a command to register an origin to receive notifications about changes
to its Cache Storage.
Cache Storage is primarily used by Service Workers to store resources for offline use.
Args:
origin: The security origin (e.g., "https://example.com") to monitor.
... | track_cache_storage_for_origin | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def track_cache_storage_for_storage_key(storage_key: str) -> Command[Response]:
"""
Generates a command to register a storage key to receive notifications
about changes to its Cache Storage.
Similar to track_cache_storage_for_origin, but uses the storage key
for more precise iso... |
Generates a command to register a storage key to receive notifications
about changes to its Cache Storage.
Similar to track_cache_storage_for_origin, but uses the storage key
for more precise isolation.
Args:
storage_key: The storage key to monitor.
Return... | track_cache_storage_for_storage_key | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def track_indexed_db_for_origin(origin: str) -> Command[Response]:
"""
Generates a command to register an origin to receive notifications about changes
to its IndexedDB.
IndexedDB is a NoSQL database system in the browser for storing
large amounts of structured data.
Ar... |
Generates a command to register an origin to receive notifications about changes
to its IndexedDB.
IndexedDB is a NoSQL database system in the browser for storing
large amounts of structured data.
Args:
origin: The security origin (e.g., "https://example.com") to m... | track_indexed_db_for_origin | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def track_indexed_db_for_storage_key(storage_key: str) -> Command[Response]:
"""
Generates a command to register a storage key to receive notifications
about changes to its IndexedDB.
Similar to track_indexed_db_for_origin, but uses the storage key
for more precise isolation.
... |
Generates a command to register a storage key to receive notifications
about changes to its IndexedDB.
Similar to track_indexed_db_for_origin, but uses the storage key
for more precise isolation.
Args:
storage_key: The storage key to monitor.
Returns:
... | track_indexed_db_for_storage_key | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def untrack_cache_storage_for_origin(origin: str) -> Command[Response]:
"""
Generates a command to unregister an origin from receiving notifications
about changes to its Cache Storage.
Use this method to stop monitoring Cache Storage after using track_cache_storage_for_origin.
... |
Generates a command to unregister an origin from receiving notifications
about changes to its Cache Storage.
Use this method to stop monitoring Cache Storage after using track_cache_storage_for_origin.
Args:
origin: The security origin (e.g., "https://example.com") to stop... | untrack_cache_storage_for_origin | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def untrack_cache_storage_for_storage_key(storage_key: str) -> Command[Response]:
"""
Generates a command to unregister a storage key from receiving notifications
about changes to its Cache Storage.
Use this method to stop monitoring Cache Storage after using
track_cache_storage... |
Generates a command to unregister a storage key from receiving notifications
about changes to its Cache Storage.
Use this method to stop monitoring Cache Storage after using
track_cache_storage_for_storage_key.
Args:
storage_key: The storage key to stop monitoring.... | untrack_cache_storage_for_storage_key | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def untrack_indexed_db_for_origin(origin: str) -> Command[Response]:
"""
Generates a command to unregister an origin from receiving notifications
about changes to its IndexedDB.
Use this method to stop monitoring IndexedDB after using track_indexed_db_for_origin.
Args:
... |
Generates a command to unregister an origin from receiving notifications
about changes to its IndexedDB.
Use this method to stop monitoring IndexedDB after using track_indexed_db_for_origin.
Args:
origin: The security origin (e.g., "https://example.com") to stop monitoring... | untrack_indexed_db_for_origin | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def untrack_indexed_db_for_storage_key(storage_key: str) -> Command[Response]:
"""
Generates a command to unregister a storage key from receiving notifications
about changes to its IndexedDB.
Use this method to stop monitoring IndexedDB after using track_indexed_db_for_storage_key.
... |
Generates a command to unregister a storage key from receiving notifications
about changes to its IndexedDB.
Use this method to stop monitoring IndexedDB after using track_indexed_db_for_storage_key.
Args:
storage_key: The storage key to stop monitoring.
Returns:
... | untrack_indexed_db_for_storage_key | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def clear_shared_storage_entries(owner_origin: str) -> Command[Response]:
"""
Generates a command to clear all Shared Storage entries for a specific origin.
Shared Storage is an experimental API that allows cross-origin shared storage
with privacy protections.
Args:
... |
Generates a command to clear all Shared Storage entries for a specific origin.
Shared Storage is an experimental API that allows cross-origin shared storage
with privacy protections.
Args:
owner_origin: The owner origin of the Shared Storage to clear.
Returns:
... | clear_shared_storage_entries | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def clear_trust_tokens(issuer_origin: str) -> Command[ClearTrustTokensResponse]:
"""
Generates a command to remove all Trust Tokens issued by the specified origin.
Trust Tokens are an experimental API for combating fraud while preserving user
privacy. This command keeps other stored dat... |
Generates a command to remove all Trust Tokens issued by the specified origin.
Trust Tokens are an experimental API for combating fraud while preserving user
privacy. This command keeps other stored data, including the issuer's redemption
records, intact.
Args:
iss... | clear_trust_tokens | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def delete_shared_storage_entry(owner_origin: str, key: str) -> Command[Response]:
"""
Generates a command to delete a specific Shared Storage entry.
Args:
owner_origin: The owner origin of the Shared Storage.
key: The key of the entry to delete.
Returns:
... |
Generates a command to delete a specific Shared Storage entry.
Args:
owner_origin: The owner origin of the Shared Storage.
key: The key of the entry to delete.
Returns:
Command: The CDP command to delete the Shared Storage entry.
| delete_shared_storage_entry | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def delete_storage_bucket(bucket: StorageBucket) -> Command[Response]:
"""
Generates a command to delete a Storage Bucket with the specified key and name.
Storage Buckets are an experimental API for managing storage data with
greater granularity and expiration control.
Args:
... |
Generates a command to delete a Storage Bucket with the specified key and name.
Storage Buckets are an experimental API for managing storage data with
greater granularity and expiration control.
Args:
bucket: A StorageBucket object containing the storageKey and name of the... | delete_storage_bucket | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def get_affected_urls_for_third_party_cookie_metadata(
first_party_url: str, third_party_urls: list[str]
) -> Command[GetAffectedUrlsForThirdPartyCookieMetadataResponse]:
"""
Generates a command to get the list of URLs from a page and its embedded resources
that match existing grace ... |
Generates a command to get the list of URLs from a page and its embedded resources
that match existing grace period URL pattern rules.
This command is useful for monitoring which URLs would be affected by the
Privacy Sandbox's third-party cookie policies.
Args:
fir... | get_affected_urls_for_third_party_cookie_metadata | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def get_interest_group_details(
owner_origin: str, name: str
) -> Command[GetInterestGroupDetailsResponse]:
"""
Generates a command to get details of a specific interest group.
Interest Groups are part of the FLEDGE/Protected Audience API for privacy-preserving
advertising, ... |
Generates a command to get details of a specific interest group.
Interest Groups are part of the FLEDGE/Protected Audience API for privacy-preserving
advertising, enabling in-browser ad auctions.
Args:
owner_origin: The owner origin of the interest group.
name:... | get_interest_group_details | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def get_related_website_sets(
sets: list[RelatedWebsiteSet],
) -> Command[GetRelatedWebsiteSetsResponse]:
"""
Generates a command to get related website sets.
Related Website Sets are an API that allows sites under the same entity
to share some data, despite third-party cook... |
Generates a command to get related website sets.
Related Website Sets are an API that allows sites under the same entity
to share some data, despite third-party cookie restrictions.
Args:
sets: list of RelatedWebsiteSet objects.
Returns:
Command: The C... | get_related_website_sets | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def get_shared_storage_entries(owner_origin: str) -> Command[GetSharedStorageEntriesResponse]:
"""
Generates a command to get all Shared Storage entries for an origin.
Args:
owner_origin: The owner origin of the Shared Storage.
Returns:
Command: The CDP command ... |
Generates a command to get all Shared Storage entries for an origin.
Args:
owner_origin: The owner origin of the Shared Storage.
Returns:
Command: The CDP command to get the Shared Storage entries.
| get_shared_storage_entries | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def get_shared_storage_metadata(owner_origin: str) -> Command[GetSharedStorageMetadataResponse]:
"""
Generates a command to get Shared Storage metadata for an origin.
Metadata includes information such as usage, budget, and creation time.
Args:
owner_origin: The owner origi... |
Generates a command to get Shared Storage metadata for an origin.
Metadata includes information such as usage, budget, and creation time.
Args:
owner_origin: The owner origin of the Shared Storage.
Returns:
Command: The CDP command to get Shared Storage metada... | get_shared_storage_metadata | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def override_quota_for_origin(
origin: str, quota_size: Optional[float] = None
) -> Command[Response]:
"""
Generates a command to override the storage quota for a specific origin.
This command is useful for storage exhaustion testing or simulating
different storage condition... |
Generates a command to override the storage quota for a specific origin.
This command is useful for storage exhaustion testing or simulating
different storage conditions.
Args:
origin: The origin for which to override the quota.
quota_size: The size of the new ... | override_quota_for_origin | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def set_attribution_reporting_tracking(enable: bool) -> Command[Response]:
"""
Generates a command to enable or disable Attribution Reporting tracking.
Args:
enable: True to enable tracking, False to disable it.
Returns:
Command: The CDP command to set Attributi... |
Generates a command to enable or disable Attribution Reporting tracking.
Args:
enable: True to enable tracking, False to disable it.
Returns:
Command: The CDP command to set Attribution Reporting tracking.
| set_attribution_reporting_tracking | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def set_interest_group_auction_tracking(enable: bool) -> Command[Response]:
"""
Generates a command to enable or disable interest group auction tracking.
Interest group auctions are part of the FLEDGE/Protected Audience API and
allow for in-browser ad auctions in a privacy-preserving wa... |
Generates a command to enable or disable interest group auction tracking.
Interest group auctions are part of the FLEDGE/Protected Audience API and
allow for in-browser ad auctions in a privacy-preserving way.
Args:
enable: True to enable tracking, False to disable it.
... | set_interest_group_auction_tracking | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def set_interest_group_tracking(enable: bool) -> Command[Response]:
"""
Generates a command to enable or disable interest group tracking.
Args:
enable: True to enable tracking, False to disable it.
Returns:
Command: The CDP command to set interest group tracking... |
Generates a command to enable or disable interest group tracking.
Args:
enable: True to enable tracking, False to disable it.
Returns:
Command: The CDP command to set interest group tracking.
| set_interest_group_tracking | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def set_shared_storage_entry(
owner_origin: str, key: str, value: str, ignore_if_present: Optional[bool] = None
) -> Command[Response]:
"""
Generates a command to set an entry in Shared Storage.
Args:
owner_origin: The owner origin of the Shared Storage.
key:... |
Generates a command to set an entry in Shared Storage.
Args:
owner_origin: The owner origin of the Shared Storage.
key: The key of the entry to set.
value: The value of the entry to set.
ignore_if_present: If True, won't replace an existing entry with th... | set_shared_storage_entry | python | autoscrape-labs/pydoll | pydoll/commands/storage_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/storage_commands.py | MIT |
def activate_target(target_id: str) -> Command[Response]:
"""
Generates a command to activate (focus) a target.
Args:
target_id: ID of the target to activate.
Returns:
Command: The CDP command to activate the target.
"""
params = ActivateTargetPa... |
Generates a command to activate (focus) a target.
Args:
target_id: ID of the target to activate.
Returns:
Command: The CDP command to activate the target.
| activate_target | python | autoscrape-labs/pydoll | pydoll/commands/target_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/target_commands.py | MIT |
def attach_to_target(
target_id: str, flatten: Optional[bool] = None
) -> Command[AttachToTargetResponse]:
"""
Generates a command to attach to a target with the given ID.
When attached to a target, you can send commands to it and receive events from it.
This is essential fo... |
Generates a command to attach to a target with the given ID.
When attached to a target, you can send commands to it and receive events from it.
This is essential for controlling and automating targets like browser tabs.
Args:
target_id: ID of the target to attach to.
... | attach_to_target | python | autoscrape-labs/pydoll | pydoll/commands/target_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/target_commands.py | MIT |
def close_target(target_id: str) -> Command[Response]:
"""
Generates a command to close a target.
If the target is a page or a tab, it will be closed. This is equivalent to
clicking the close button on a browser tab.
Args:
target_id: ID of the target to close.
... |
Generates a command to close a target.
If the target is a page or a tab, it will be closed. This is equivalent to
clicking the close button on a browser tab.
Args:
target_id: ID of the target to close.
Returns:
Command: The CDP command to close the tar... | close_target | python | autoscrape-labs/pydoll | pydoll/commands/target_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/target_commands.py | MIT |
def detach_from_target(session_id: Optional[str] = None) -> Command[Response]:
"""
Generates a command to detach a session from its target.
After detaching, you will no longer receive events from the target and
cannot send commands to it.
Args:
session_id: Session I... |
Generates a command to detach a session from its target.
After detaching, you will no longer receive events from the target and
cannot send commands to it.
Args:
session_id: Session ID to detach. If not specified, detaches all sessions.
Returns:
Comman... | detach_from_target | python | autoscrape-labs/pydoll | pydoll/commands/target_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/target_commands.py | MIT |
def dispose_browser_context(browser_context_id: str) -> Command[Response]:
"""
Generates a command to delete a browser context.
All pages belonging to the browser context will be closed without calling
their beforeunload hooks. This is similar to closing an incognito profile.
A... |
Generates a command to delete a browser context.
All pages belonging to the browser context will be closed without calling
their beforeunload hooks. This is similar to closing an incognito profile.
Args:
browser_context_id: The ID of the browser context to dispose.
... | dispose_browser_context | python | autoscrape-labs/pydoll | pydoll/commands/target_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/target_commands.py | MIT |
def get_targets(filter: Optional[list] = None) -> Command[GetTargetsResponse]:
"""
Generates a command to retrieve a list of available targets.
Targets include tabs, extensions, web workers, and other attachable entities
in the browser. This is useful for discovering what targets exist ... |
Generates a command to retrieve a list of available targets.
Targets include tabs, extensions, web workers, and other attachable entities
in the browser. This is useful for discovering what targets exist before
attaching to them.
Args:
filter: Only targets matching... | get_targets | python | autoscrape-labs/pydoll | pydoll/commands/target_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/target_commands.py | MIT |
def set_auto_attach(
auto_attach: bool,
wait_for_debugger_on_start: Optional[bool] = None,
flatten: Optional[bool] = None,
filter: Optional[list] = None,
) -> Command[Response]:
"""
Generates a command to control whether to automatically attach to new targets.
... |
Generates a command to control whether to automatically attach to new targets.
This method controls whether to automatically attach to new targets which are
considered to be directly related to the current one (for example, iframes or workers).
When turned on, it also attaches to all e... | set_auto_attach | python | autoscrape-labs/pydoll | pydoll/commands/target_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/target_commands.py | MIT |
def attach_to_browser_target(session_id: str) -> Command[AttachToBrowserTargetResponse]:
"""
Generates a command to attach to the browser target.
This is an experimental method that attaches to the browser target,
only using flat sessionId mode. The browser target is a special target th... |
Generates a command to attach to the browser target.
This is an experimental method that attaches to the browser target,
only using flat sessionId mode. The browser target is a special target that
represents the browser itself rather than a page or other content.
Args:
... | attach_to_browser_target | python | autoscrape-labs/pydoll | pydoll/commands/target_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/target_commands.py | MIT |
def get_target_info(target_id: str) -> Command[GetTargetInfoResponse]:
"""
Generates a command to get information about a specific target.
This experimental method returns detailed information about a target,
such as its type, URL, title, and other properties.
Args:
... |
Generates a command to get information about a specific target.
This experimental method returns detailed information about a target,
such as its type, URL, title, and other properties.
Args:
target_id: ID of the target to get information about.
Returns:
... | get_target_info | python | autoscrape-labs/pydoll | pydoll/commands/target_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/target_commands.py | MIT |
def set_remote_locations(locations: list[RemoteLocation]) -> Command[Response]:
"""
Generates a command to enable target discovery for specified remote locations.
This experimental method enables target discovery for remote locations when
setDiscoverTargets was set to true. This is usef... |
Generates a command to enable target discovery for specified remote locations.
This experimental method enables target discovery for remote locations when
setDiscoverTargets was set to true. This is useful for discovering targets
on remote devices or in different browser instances.
... | set_remote_locations | python | autoscrape-labs/pydoll | pydoll/commands/target_commands.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/commands/target_commands.py | MIT |
def __init__(
self,
connection_port: int,
page_id: Optional[str] = None,
ws_address_resolver: Callable[[int], Coroutine[Any, Any, str]] = get_browser_ws_address,
ws_connector: type[Connect] = websockets.connect,
):
"""
Initialize connection handler.
A... |
Initialize connection handler.
Args:
connection_port: Browser's debugging server port.
page_id: Target page ID. If None, connects to browser-level endpoint.
ws_address_resolver: Function to resolve WebSocket URL from port.
ws_connector: WebSocket connect... | __init__ | python | autoscrape-labs/pydoll | pydoll/connection/connection_handler.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/connection_handler.py | MIT |
async def ping(self) -> bool:
"""Test if WebSocket connection is active and responsive."""
with suppress(Exception):
await self._ensure_active_connection()
await cast(WebSocketClientProtocol, self._ws_connection).ping()
return True
return False | Test if WebSocket connection is active and responsive. | ping | python | autoscrape-labs/pydoll | pydoll/connection/connection_handler.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/connection_handler.py | MIT |
async def execute_command(self, command: Command[T], timeout: int = 10) -> T:
"""
Send CDP command and await response.
Args:
command: CDP command to send.
timeout: Maximum seconds to wait for response.
Returns:
Parsed response object matching command... |
Send CDP command and await response.
Args:
command: CDP command to send.
timeout: Maximum seconds to wait for response.
Returns:
Parsed response object matching command's expected type.
Raises:
CommandExecutionTimeout: If browser doesn'... | execute_command | python | autoscrape-labs/pydoll | pydoll/connection/connection_handler.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/connection_handler.py | MIT |
async def register_callback(
self,
event_name: str,
callback: Callable[[dict], Awaitable[None]],
temporary: bool = False,
) -> int:
"""
Register event listener for CDP events.
Args:
event_name: CDP event name (e.g., 'Page.loadEventFired').
... |
Register event listener for CDP events.
Args:
event_name: CDP event name (e.g., 'Page.loadEventFired').
callback: Async function called when event occurs.
temporary: If True, callback removed after first trigger.
Returns:
Callback ID for later r... | register_callback | python | autoscrape-labs/pydoll | pydoll/connection/connection_handler.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/connection_handler.py | MIT |
async def remove_callback(self, callback_id: int) -> bool:
"""Remove registered event callback by ID."""
return self._events_handler.remove_callback(callback_id) | Remove registered event callback by ID. | remove_callback | python | autoscrape-labs/pydoll | pydoll/connection/connection_handler.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/connection_handler.py | MIT |
async def close(self):
"""Close WebSocket connection and release resources."""
await self.clear_callbacks()
if self._ws_connection is None:
return
with suppress(websockets.ConnectionClosed):
await self._ws_connection.close()
logger.info('WebSocket connect... | Close WebSocket connection and release resources. | close | python | autoscrape-labs/pydoll | pydoll/connection/connection_handler.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/connection_handler.py | MIT |
async def _ensure_active_connection(self):
"""Ensure active connection exists, establishing new one if needed."""
if self._ws_connection is None or self._ws_connection.closed:
await self._establish_new_connection() | Ensure active connection exists, establishing new one if needed. | _ensure_active_connection | python | autoscrape-labs/pydoll | pydoll/connection/connection_handler.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/connection_handler.py | MIT |
async def _establish_new_connection(self):
"""Create fresh WebSocket connection and start event listening."""
ws_address = await self._resolve_ws_address()
logger.info(f'Connecting to {ws_address}')
self._ws_connection = await self._ws_connector(
ws_address,
max_s... | Create fresh WebSocket connection and start event listening. | _establish_new_connection | python | autoscrape-labs/pydoll | pydoll/connection/connection_handler.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/connection_handler.py | MIT |
async def _resolve_ws_address(self):
"""Determine correct WebSocket address based on page ID."""
if not self._page_id:
return await self._ws_address_resolver(self._connection_port)
return f'ws://localhost:{self._connection_port}/devtools/page/{self._page_id}' | Determine correct WebSocket address based on page ID. | _resolve_ws_address | python | autoscrape-labs/pydoll | pydoll/connection/connection_handler.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/connection_handler.py | MIT |
async def _handle_connection_loss(self):
"""Clean up resources after connection loss."""
if self._ws_connection and not self._ws_connection.closed:
await self._ws_connection.close()
self._ws_connection = None
if self._receive_task and not self._receive_task.done():
... | Clean up resources after connection loss. | _handle_connection_loss | python | autoscrape-labs/pydoll | pydoll/connection/connection_handler.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/connection_handler.py | MIT |
async def _receive_events(self):
"""Main loop for receiving and processing WebSocket messages."""
try:
async for raw_message in self._incoming_messages():
await self._process_single_message(raw_message)
except websockets.ConnectionClosed as e:
logger.info(... | Main loop for receiving and processing WebSocket messages. | _receive_events | python | autoscrape-labs/pydoll | pydoll/connection/connection_handler.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/connection_handler.py | MIT |
async def _incoming_messages(self) -> AsyncGenerator[Union[str, bytes], None]:
"""Generator yielding raw messages from WebSocket connection."""
ws = cast(WebSocketClientProtocol, self._ws_connection)
while not ws.closed:
yield await ws.recv() | Generator yielding raw messages from WebSocket connection. | _incoming_messages | python | autoscrape-labs/pydoll | pydoll/connection/connection_handler.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/connection_handler.py | MIT |
def _parse_message(raw_message: str) -> Union[Event, Response, None]:
"""Parse raw message string into JSON object."""
try:
return json.loads(raw_message)
except json.JSONDecodeError:
logger.warning(f'Failed to parse message: {raw_message[:200]}...')
return No... | Parse raw message string into JSON object. | _parse_message | python | autoscrape-labs/pydoll | pydoll/connection/connection_handler.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/connection_handler.py | MIT |
def __init__(self) -> None:
"""Initialize command manager with empty state."""
self._pending_commands: dict[int, asyncio.Future] = {}
self._id = 1 | Initialize command manager with empty state. | __init__ | python | autoscrape-labs/pydoll | pydoll/connection/managers/commands_manager.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/managers/commands_manager.py | MIT |
def create_command_future(self, command: Command) -> asyncio.Future:
"""
Create future for command and assign unique ID.
Args:
command: Command to prepare for execution.
Returns:
Future that resolves when command completes.
"""
command['id'] = se... |
Create future for command and assign unique ID.
Args:
command: Command to prepare for execution.
Returns:
Future that resolves when command completes.
| create_command_future | python | autoscrape-labs/pydoll | pydoll/connection/managers/commands_manager.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/managers/commands_manager.py | MIT |
def resolve_command(self, response_id: int, result: str):
"""Resolve pending command with its result."""
if response_id in self._pending_commands:
self._pending_commands[response_id].set_result(result)
del self._pending_commands[response_id] | Resolve pending command with its result. | resolve_command | python | autoscrape-labs/pydoll | pydoll/connection/managers/commands_manager.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/managers/commands_manager.py | MIT |
def __init__(self) -> None:
"""Initialize events manager with empty state."""
self._event_callbacks: dict[int, dict] = {}
self._callback_id = 0
self.network_logs: list[Event] = []
self.dialog = JavascriptDialogOpeningEvent(method='')
logger.info('EventsManager initialized... | Initialize events manager with empty state. | __init__ | python | autoscrape-labs/pydoll | pydoll/connection/managers/events_manager.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/managers/events_manager.py | MIT |
def register_callback(
self, event_name: str, callback: Callable[[dict], Any], temporary: bool = False
) -> int:
"""
Register callback for specific event type.
Args:
event_name: Event name to listen for.
callback: Function called when event occurs.
... |
Register callback for specific event type.
Args:
event_name: Event name to listen for.
callback: Function called when event occurs.
temporary: If True, callback removed after first trigger.
Returns:
Callback ID for later removal.
| register_callback | python | autoscrape-labs/pydoll | pydoll/connection/managers/events_manager.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/managers/events_manager.py | MIT |
async def process_event(self, event_data: Event):
"""
Process received event and trigger callbacks.
Handles special events (network requests, dialogs) and updates
internal state before triggering registered callbacks.
"""
event_name = event_data['method']
logger.... |
Process received event and trigger callbacks.
Handles special events (network requests, dialogs) and updates
internal state before triggering registered callbacks.
| process_event | python | autoscrape-labs/pydoll | pydoll/connection/managers/events_manager.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/managers/events_manager.py | MIT |
def _update_network_logs(self, event_data: Event):
"""Add network event to logs (keeps last 10000 entries)."""
self.network_logs.append(event_data)
self.network_logs = self.network_logs[-10000:] # keep only last 10000 logs | Add network event to logs (keeps last 10000 entries). | _update_network_logs | python | autoscrape-labs/pydoll | pydoll/connection/managers/events_manager.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/managers/events_manager.py | MIT |
async def _trigger_callbacks(self, event_name: str, event_data: Event):
"""Trigger all registered callbacks for event, removing temporary ones."""
callbacks_to_remove = []
for cb_id, cb_data in list(self._event_callbacks.items()):
if cb_data['event'] == event_name:
t... | Trigger all registered callbacks for event, removing temporary ones. | _trigger_callbacks | python | autoscrape-labs/pydoll | pydoll/connection/managers/events_manager.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/connection/managers/events_manager.py | MIT |
def __init__(
self,
object_id: str,
connection_handler: ConnectionHandler,
method: Optional[str] = None,
selector: Optional[str] = None,
attributes_list: list[str] = [],
):
"""
Initialize WebElement wrapper.
Args:
object_id: Unique... |
Initialize WebElement wrapper.
Args:
object_id: Unique CDP object identifier for this DOM element.
connection_handler: Connection instance for browser communication.
method: Search method used to find this element (for debugging).
selector: Selector stri... | __init__ | python | autoscrape-labs/pydoll | pydoll/elements/web_element.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/elements/web_element.py | MIT |
async def text(self) -> str:
"""Visible text content of the element."""
outer_html = await self.inner_html
soup = BeautifulSoup(outer_html, 'html.parser')
return soup.get_text(strip=True) | Visible text content of the element. | text | python | autoscrape-labs/pydoll | pydoll/elements/web_element.py | https://github.com/autoscrape-labs/pydoll/blob/master/pydoll/elements/web_element.py | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.