code wiki / _hdl_build / nx_html_extract_data.nx

nx_html_extract_data.nx

buildroot/runtime/_hdl_build/nx_html_extract_data.nx

3866 B76 linesdepth 3pulls 3 transitivereach 1 importersview sourcekind librarytopic html
docsdependenciesstructsconstsfunctions

about

nx_html_extract_data.nx -- JS-RENDER FETCHER rung 1: STRUCTURED-DATA EXTRACTION. Many "JS-rendered" pages embed content as JSON-LD (<script application/ld+json>) + OpenGraph meta -- recoverable WITHOUT executing JS. Pulls prose fields (headline/name/description/articleBody) AND og:description out of raw HTML so the researcher can read JS sites' structured content. Reuses re_find/re_strlen (DRY). HONEST SCOPE: embedded/SSR data only; fully client-fetched content needs rung 2 (API discovery) then rung 3 (a sovereign JS interpreter + DOM). license_tier: ORIGINAL.

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_research_extract.nx nx_html_extract_data.nx nx_html_extract_data_test.nx

imports: nx_syscalls.nxnx_research_extract.nx

imported by: nx_html_extract_data_test.nx

structs

none

consts

12const K_MAGIC_65536: i64 = 65536

functions

17func hed_field(html: *u8, n: i64, keypat: *u8, out: *u8, cap: i64) -> i64
40func hed_meta(html: *u8, n: i64, marker: *u8, out: *u8, cap: i64) -> i64
called by 1: nx_html_extract_data calls 1: re_find
55func hed_app(out: *u8, off: *i64, s: *u8, slen: i64, cap: i64) -> i64
63func nx_html_extract_data(html: *u8, n: i64, out: *u8, cap: i64) -> i64