FieldSpec.
One field of an extraction: its name, how it is found (a CSS selector, an XPath, a regular expression, a JSON path), the attribute read, its type, whether many, and nested fields
Figure 1FieldSpecspecified
- kind
- value
- scope
- none
- key
- none
- store
- none
- family
- sources
Fields#
| field | type | required | note |
|---|---|---|---|
name | text | yes | |
selector_kind | one of css | xpath | regex | json path | yes | |
selector | text | yes | |
attribute | text | no | text by default; for a pattern, where it runs: the visible text by default, address (the page’s own address), nodes (the text nodes joined by a bar) or html (the page’s markup, or the item’s inside a list, so an identity kept in a data attribute or a link is read the same way on every surface) |
type | text | yes | a type of the register |
many | bool | yes | |
fields | FieldSpec | no | nested |
Routes that use it#
No route takes or returns FieldSpec directly. The record holds it, and the objects that point at it reach it.