Skip to main content

BaseBrowserPlugin

crawlee.browsers._base_browser_plugin.BaseBrowserPlugin

An abstract base class for browser plugins.

Browser plugins act as wrappers around browser automation tools like Playwright, providing a unified interface for interacting with browsers.

Index

Methods

__aenter__

  • async __aenter__(): BaseBrowserPlugin
  • Enter the context manager and initialize the browser plugin.


    Returns BaseBrowserPlugin

__aexit__

  • async __aexit__(exc_type, exc_value, exc_traceback): None
  • Exit the context manager and close the browser plugin.


    Parameters

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

    Returns None

new_browser

  • async new_browser(): BaseBrowserController
  • Create a new browser instance.


    Returns BaseBrowserController

Properties

AUTOMATION_LIBRARY

AUTOMATION_LIBRARY: str | None

The name of the automation library that the plugin is managing.

browser_options

browser_options: Mapping[str, Any]

Return the options for a new browser.

browser_type

browser_type: BrowserType

Return the browser type name.

max_open_pages_per_browser

max_open_pages_per_browser: int

Return the maximum number of pages that can be opened in a single browser.

page_options

page_options: Mapping[str, Any]

Return the options for a new page.