Bulk-extracting data from an authenticated Next.js SPA via browser automation
Browser-automation JS-eval results truncate near 1KB, so returning a 20KB+ dataset in chunks costs dozens of round trips. Route it through the OS clipboard instead: build the string into a window global, navigator.clipboard.writeText(it), then read it host-side with pbpaste. Two gotchas: writeText throws "Document is not focused" unless you click the page first in the SAME batched call, and document.execCommand("copy") just returns false in that context rather than erroring. To learn the API shape without intercepting traffic, fetch the public _next/static/<buildId>/_buildManifest.js to enumerate page chunks, download them with curl, and regex for GraphQL query template literals between backticks. Detail-page queries often expose fields the list query omits (a per-record bio field existed only on the detail query), so grep every page chunk, not just the list one. Note that fetching a Next.js static-export page HTML server-side yields empty pageProps because data is client-fetched, so server-side scraping of the markup returns nothing useful.