How do I make all elements of a webpage appear in the source?
<p>When I press "view-source" (in chrome) of certain webpages, I get some thinned-version of an html, opposed to the more rich version I get when I press "inspect". </p>

<p>I think some content (maybe the scripts) are hidden when you view the source code, and all you get is the script code and not what it translates into.</p>

<p>Is there a way to get the more rich version as an html? (And obviously - if there is - how do you get it?)</p>

<p>Either for download manually, or for when you open a url to read in some program (python urlopen, for example)</p>

<p>What "Show Source" does is give you the actual raw original source file that the browser received from the server. What you see in your browser and what the <em>Element Inspector</em> shows you is the current state of the DOM, these days often heavily modified at runtime by Javascript. </p>

<p>source = what the page started with<br>
current DOM = what the page looks like now after dynamic modification</p>

<p>Nothing is being "thinned".</p>

<p>I don't know about your browser, but mine allows me to copy the current DOM as HTML, I just need to select the topmost element:</p>

<p><a href="http://i.stack.imgur.com/y2gHd.png" rel="nofollow"><img src="http://i.stack.imgur.com/y2gHd.png" alt="enter image description here"></a></p>

javascript python html element inspect