ChadSelect
Unified data extraction — Regex, XPath 1.0, CSS Selectors, and JMESPath behind one query interface.
use ChadSelect;
let mut cs = new;
cs.add_html;
let price = cs.select;
assert_eq!;
Query prefixes
| Prefix | Engine | Content types |
|---|---|---|
regex: |
Regex | All |
xpath: |
XPath 1.0 | HTML, Text |
css: |
CSS | HTML |
json: |
JMESPath | JSON |
If no prefix is provided, the query defaults to Regex.
Post-processing functions
Pipe results through text functions using >>:
css:.price >> normalize-space() >> uppercase()
xpath://div/text() >> substring-after('VIN: ')