Skip to main content

PlaywrightCrawlingContext

The crawling context used by the PlaywrightCrawler.

It provides access to key objects as well as utility functions for handling crawling tasks.

Hierarchy

Index

Methods

__hash__

  • __hash__(): int

Properties

add_requests

add_requests: AddRequestsFunction

Add requests crawling context helper function.

block_requests

block_requests: BlockRequestsFunction

Blocks network requests matching specified URL patterns.

enqueue_links

enqueue_links: EnqueueLinksFunction

The Playwright EnqueueLinksFunction implementation.

get_key_value_store

Get key-value store crawling context helper function.

infinite_scroll

infinite_scroll: Callable[[], Awaitable[None]]

A function to perform infinite scrolling on the page. This scrolls to the bottom, triggering the loading of additional content if present.

log

log: logging.Logger

Logger instance.

page

page: Page

The Playwright Page object for the current page.

proxy_info

proxy_info: ProxyInfo | None

Proxy information for the current page being processed.

push_data

push_data: PushDataFunction

Push data crawling context helper function.

request

request: Request

Request object for the current page being processed.

response

response: Response

The Playwright Response object containing the response details for the current URL.

send_request

send_request: SendRequestFunction

Send request crawling context helper function.

session

session: Session | None

Session object for the current page being processed.

use_state

use_state: UseStateFunction

Use state crawling context helper function.