common_browser.schemas.configs.extraction
Declarative bounds and field reads for browser observations.
Classes
ExtractConfig
Bases: BaseModel
Bound observed DOM rows and raw values before caller-owned validation.
Fields and properties declared here; inherited members belong to the bases above.
fields
fields: dict[str, FieldRead] = Field(min_length=1, repr=False)limit
limit: int = Field(default=100, ge=1, le=10000)max_field_chars
max_field_chars: int = Field(default=65536, ge=1, le=10000000)rows
rows: Target = Field(repr=False)FieldRead
Bases: BaseModel
Read a scalar from a row-relative target; missing optional reads are omitted.
text is rendered text, html is outer HTML, attribute preserves
the literal attribute, and value reads the element’s scalar DOM value.
Python conversion belongs to the caller’s model or decoder.
Fields and properties declared here; inherited members belong to the bases above.
attribute
attribute: str | None = Nonerequired
required: bool = Truesource
source: Literal['text', 'html', 'attribute', 'value'] = 'text'target
target: Target = Field(repr=False)ReadConfig
Bases: BaseModel
Read rendered text or outer HTML from one explicit document/element scope.
Fields and properties declared here; inherited members belong to the bases above.
max_chars
max_chars: int = Field(default=20000, ge=1, le=10000000)mode
mode: Literal['text', 'html'] = 'text'scope
scope: Target | ElementRef | None = Field(default=None, repr=False)ScanConfig
Bases: BaseModel
Bound a DOM observation; iframe recursion and accessibility are explicit.
Fields and properties declared here; inherited members belong to the bases above.
include_accessibility
include_accessibility: bool = Falseinclude_frames
include_frames: bool = Falseinclude_hidden
include_hidden: bool = Falselimit
limit: int = Field(default=100, ge=1, le=10000)max_frames
max_frames: int = Field(default=20, ge=1, le=1000)max_nodes
max_nodes: int = Field(default=10000, ge=1, le=200000)max_text_chars
max_text_chars: int = Field(default=6000, ge=1, le=1000000)scope
scope: Target | ElementRef | None = Field(default=None, repr=False)