On Wed, Mar 11, 2009 at 1:19 PM, Micah Cowan
<address@hidden> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Steven D'Amico wrote:
> I'm a bit of an amateur when it comes to using like this, so pardon if
> my question is dumb/silly. (Or if I missed something in the manual).
>
> I'm trying to figure out if there is a way for wget to download the
> source code I'd get for a site by viewing that source from a browser.
If you mean the HTML source (which is what you would see with "view
source" in your browser), then you should understand that there is no
such thing as a web page that is _not_ source. If Wget successfully
downloaded a web page, it got the source.
He probably has logged in with cookies etc or seeing something after a lot of clicking and wants to download that page. While CTRL-U (see source) will show the right "source" a wget on the URL would probably give something entirely different (the log-in page).
Also it's not entirely impossible for a web server to discriminate against wget.
I have as a rule the use of --user-agent="{firefox UA here}" --keep-session-cookies
If a log-in is involved, two consecutive requests with --save-cookies=cookies.dat and --load-cookies=cookies.dat would be needed.
But of course, this is just guessing on my part.
FC