ImplBrowser (_impl_browser.py)

dendrite-python-sdk · scraping, browser-abstraction, base-class, interface, multi-implementation, dev-tools

108. Browser as required base abstraction to ensure multiple implementations.

# Source: https://github.com/nerdy-tech-com-gitub/dendrite-python-sdk | License: MIT | Copyright 2024 Dendrite Systems
# Provided via justclaw.it.com; keep this notice with the code.
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from dendrite.sync_api._core.dendrite_browser import Dendrite
from dendrite.sync_api._core._type_spec import PlaywrightPage
from playwright.sync_api import Download, Browser, Playwright


class ImplBrowser(ABC):

    @abstractmethod
    def __init__(self, settings):
        pass

    @abstractmethod
    def get_download(
        self, dendrite_browser: "Dendrite", pw_page: PlaywrightPage, timeout: float
    ) -> Download:
        """
        Retrieves the download event from the browser.

        Returns:
            Do

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key