Skip to content
hsblabs OSS

The pages of this site tell you how to use Scraping KDL. The documents below are the canon. When a page here and a document below do not agree, the document below is correct.

Document Content
Language v0.1 The full grammar, the semantics, and the validation rules.
Built-ins v0.1 Each built-in transform, with its signature and its behavior.
Selectors v0.1 The portable subset of CSS and the rejected constructions.
Diagnostics Each diagnostic code, its severity, and its condition.
Grammar summary The EBNF summary of the syntax.

Machine-readable data for a tool:

Document Content
IR schema The JSON Schema of the Validated IR.
IR README The version policy and the layout of the directory.
Example IR A complete IR document.

The IR is the boundary between the compiler and a runtime. Use the schema when you write a tool that reads a program or that makes one.

For the Go API, use go doc:

Terminal window
go doc github.com/hsblabs/scrape-kdl
Document Content
Compiler pipeline The seven stages of the validation.
HTTP runtime The behavior of the request and of the recovery.
Browser runtime The contract of the adapter and the workflow.
Playwright adapter The details of the TypeScript adapter.
go-rod adapter The details of the Go adapter.
HTML compatibility The parse of the HTML and the differences from a browser.
Performance The measured behavior and the limits.
Document Content
Compatibility The supported versions of Go, of Node.js, and of Bun.
Versioning The version of the language, the version of the IR, and the version of the release.
Migrate to v1 The changes from an earlier version.
Changelog The history of the releases.
Security model The trust levels and the protections of the runtime.
Security policy How to report a vulnerability.
Responsible use The obligations of an operator.
  • KDL — the document language of the syntax. Scraping KDL accepts a documented subset.
  • RE2 syntax — the profile of the regular expressions. A lookaround, a backreference, and a named group are not available.
  • WHATWG HTML — the standard of the parse of the HTML.
  • CSS Selectors Level 4 — the full language. The portable profile is a small subset of it.
  • JSON Schema — the schema language of the IR document.