Skip to main content

browser_utils.playwright_markdown_browser

PlaywrightMarkdownBrowser

class PlaywrightMarkdownBrowser(RequestsMarkdownBrowser)

(In preview) A Playwright and Chromium powered Markdown web browser. PlaywrightMarkdownBrowser extends RequestsMarkdownBrowser, and replaces only the functionality of visit_page(url).

__init__

def __init__(launch_args: Dict[str, Any] = {}, **kwargs)

Instantiate a new PlaywrightMarkdownBrowser.

Arguments:

  • **launch_args - Arguments passed to playwright.chromium.launch. See Playwright documentation for more details.
  • **kwargs - PlaywrightMarkdownBrowser passes these arguments to the RequestsMarkdownBrowser superclass. See RequestsMarkdownBrowser documentation for more details.

__del__

def __del__()

Close the Playwright session and browser when garbage-collected. Garbage collection may not always occur, or may happen at a later time. Call close() explicitly if you wish to free up resources used by Playwright or Chromium.

close

def close()

Close the Playwright session and browser used by Playwright. The session cannot be reopened without instantiating a new PlaywrightMarkdownBrowser instance.