nx_price_extract.nx
buildroot/runtime/nx_price_extract.nx
about
nx_price_extract.nx -- the Nishi BROWSER's price detector: find the price on a rendered shopping page so
the "before you buy" check (nx_purchase) can show what you have vs what it costs. Sovereign, deterministic
(no JS, no scraping libraries): scan the page text for $-amounts and take the largest (the product price,
usually -- vs $9.99 shipping). Reuses the same exact money-parsing as nx_doc_extract. The browser feeds
this its rendered DOM text (nx_html_to_text / nx_dom_query). Honest scope: "largest $-amount" heuristic;
currency/locale + labelled-price selection are later rungs. No floats, no hardware writes. license_tier: ORIGINAL
dependencies 1 imports · 3 importers
imports: nx_syscalls.nx
imported by: nx_browser_buyguard.nxnx_browser_buyguard_gate.nxnx_purchase_gate.nx
structs
| none |
consts
| none |
functions
| 9 | func px_dig(c: i64) -> i64 called by 1: px_parse_at |
| 16 | func px_parse_at(text: *u8, n: i64, i: i64) -> i64 |
| 50 | func px_find_price(text: *u8, n: i64) -> i64 |