Dump Javascript Generated Webpage


With curl or wget, it is easy enough to dump the content of a webpage. However, some webpages are generated by Javascript and curling them results in not HTML but JS garbage.

There is a way around this: use chromium to dump the page. It will properly parse and execute the JS and render parsable HTML. The command is:

chromuium --headless --incognito --dump-dom https://<url>