Take for example this snippet of code on a web page.
<html><body>
<script language="javascript">
document.write("The cat");
document.write(" sat on the mat");
</script>
</body></html>
If I were to retrieve this web page via CURL or WGET I would get that text because the Javascript has not been processed.
But I would like to retrieve this page, so I get the results of the Javascript output. So I would get just..
The cat sat on the mat
Is there some Linux Javascript sandbox/emulator/pre processor or something of that ilk that would allow me to process that text into html. I understand Javascript is complex and don't expect 100% conversion. But even to get some basic conversion would be helpful.
I know its possible as I'm sure Google does that when they index web pages to get the best results for the web pages they index.