You can use Chrome to dump the DOM, PDF, or screenshot of a webpage, or do a number of other cool things:
https://developers.google.com/web/updates/2017/04/headless-chrome
Open a website in a Chrome process headless-mode, which you can then query from a client process or another browser:
$ chrome --headless --disable-gpu --remote-debugging-port=9222 https://www.chromestatus.com
Print the site HTML:
$ chrome --headless --disable-gpu --dump-dom https://www.chromestatus.com
Capture a PDF:
$ chrome --headless --disable-gpu --print-to-pdf https://www.chromestatus.com
Capture a PNG screenshot:
$ chrome --headless --disable-gpu --screenshot https://www.chromestatus.com
Open a REPL console in which to run JavaScript expressions against the DOM:
$ chrome --headless --disable-gpu --repl https://www.chromestatus.com