Skip to main content

PlaywrightBrowserPlugin

crawlee.browsers.playwright_browser_plugin.PlaywrightBrowserPlugin

A plugin for managing Playwright automation library.

It should work as a factory for creating new browser instances.

Index

Constructors

__init__

  • __init__(*, browser_type, browser_options, page_options, max_open_pages_per_browser): None
  • Create a new instance.


    Parameters

    • browser_type: Literal['chromium', 'firefox', 'webkit'] = 'chromium'keyword-only
    • browser_options: Mapping[str, Any] | None = Nonekeyword-only
    • page_options: Mapping[str, Any] | None = Nonekeyword-only
    • max_open_pages_per_browser: int = 20keyword-only

    Returns None

Methods

__aenter__

  • async __aenter__(): PlaywrightBrowserPlugin
  • Returns PlaywrightBrowserPlugin

__aexit__

  • async __aexit__(exc_type, exc_value, exc_traceback): None
  • Parameters

    • exc_type: type[BaseException] | None
    • exc_value: BaseException | None
    • exc_traceback: TracebackType | None

    Returns None

new_browser

  • async new_browser(): PlaywrightBrowserController
  • Returns PlaywrightBrowserController

Properties

AUTOMATION_LIBRARY

AUTOMATION_LIBRARY:

browser_options

browser_options: Mapping[str, Any]

browser_type

browser_type: Literal['chromium', 'firefox', 'webkit']

max_open_pages_per_browser

max_open_pages_per_browser: int

page_options

page_options: Mapping[str, Any]