nx_yt_transcript.nx
buildroot/runtime/nx_yt_transcript.nx
about
nx_yt_transcript.nx -- fetch a YouTube transcript into knowledge/fetched/, provenance-stamped, sovereign
from the first byte: the ANDROID_VR InnerTube player response (nx_yt_innertube) yields the captionTracks
baseUrl, the shared TLS-1.3 GET (nx_https_fetch_follow) pulls the timedtext body, and nx_yt_captions_lib
parses json3/srv1 into `startMs \t durMs \t text`. The WEB baseUrl is a proven dead end (empty 200, needs a
proof-of-origin token); the ANDROID client's baseUrl carries no such requirement.
nx_yt_transcript <url-or-id> [lang] -> write knowledge/fetched/yt_<id>.<lang>.transcript.txt
nx_yt_transcript measure <url-or-id> -> the decisive route (c): player captionTracks + both formats
nx_yt_transcript compare <ours> <theirs.json3> -> referee agreement (segment counts + text permil)
Refusals by NAME: REFUSED-NO-CAPTIONS, REFUSED-LANG-ABSENT (langs listed), REFUSED-EMPTY-BODY (the pot case).
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_yt_captions_lib.nxnx_sha256.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| none |
functions
| 15 | func pw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 16 | func pn(v: i64) -> i64 |
| 25 | func t_cat(dst: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[o] = s[i]; o = o + 1; i = i + 1 } return o } |
| 26 | func t_hexnib(v: i64) -> i64 { if v < 10 { return 48 + v } return 87 + v } |
| 28 | func t_hk(doc: *u8, d0: i64, key: *u8) -> i64 |
| 38 | func t_url_lang(url: *u8, out: *u8, cap: i64) -> i64 |
| 47 | func t_norm_url(inp: *u8, out: *u8, cap: i64) -> i64 |
| 55 | func t_title(pj: *u8, jlen: i64, out: *u8, cap: i64) -> i64 |
| 67 | func t_prov(src_url: *u8, mirror: *u8, body: *u8, n: i64) -> i64 |
| 93 | func t_get_player(url: *u8, store: *TrustStore, out_pp: *i64) -> i64 |
| 101 | func do_measure(idurl: *u8, store: *TrustStore) -> i64 |
| 133 | func do_fetch(idurl: *u8, want: *u8, store: *TrustStore) -> i64 |
| 211 | func do_compare(ours_path: *u8, theirs_path: *u8) -> i64 |
| 246 | func ytc_row_count_ours(buf: *u8, len: i64) -> i64 |
| 257 | func main(argc: i64, argv: *i64) -> i64 |