如何在Go中访问网站特定的Javascript对象? [关闭]

I'm building a logging tool for websites in Golang, and was wondering if its possible to query Javascript objects from my Go program. For example, when I open up Developer Tools in Chrome, and type a specific variable in the console, the variable's value is outputted.

I'd like to develop a Go script that can query a variable's value for a given website, and print that value to the machine's command line.

I've tried googling my question in multiple phrasings, but haven't found any relevant information. I'm not even sure if its even possible in any language.

I think what you're really looking for is a "headless browser" written or consumable by Go -- here's a Reddit thread with some possibilities.

Effectively you're asking to curl a website and parse the runtime variables out of it -- but curl doesn't actually render the response, which is why you'd need a headless browser of some sort to render the output and then interact with the page in a sandbox environment.