23 lines
643 B
Python
23 lines
643 B
Python
from collections.abc import Mapping
|
|
from typing import Any
|
|
|
|
import httpx
|
|
|
|
from omniread.core.content import Content, ContentType
|
|
from omniread.core.scraper import BaseScraper
|
|
|
|
class HTMLScraper(BaseScraper):
|
|
content_type: ContentType
|
|
def __init__(
|
|
self,
|
|
*,
|
|
client: httpx.Client | None = ...,
|
|
timeout: float = ...,
|
|
headers: Mapping[str, str] | None = ...,
|
|
follow_redirects: bool = ...,
|
|
) -> None: ...
|
|
def validate_content_type(self, response: httpx.Response) -> None: ...
|
|
def fetch(
|
|
self, source: str, *, metadata: Mapping[str, Any] | None = ...
|
|
) -> Content: ...
|