Glossary
Extract schema
The description of the data a program returns: each field, where it is on the page, its type and the rules it must meet.
A field can come from an element, a regular expression, JSON embedded in the page or a network response. Kaabist parses it into a real type (money, dates, numbers in any locale) and checks constraints, so you get typed data with warnings instead of strings that might be wrong.
example
{
"title": "h1",
"price": {
"selector": ".price",
"type": "money",
"locale": "tr",
"min": 0
},
"products": {
"selector": ".product-card",
"many": true,
"min_items": 1,
"fields": {
"name": ".title",
"url": {
"selector": "a",
"attr": "href",
"type": "url"
}
}
}
}