Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wget download aspx page

I want to download the web page http://www.codeproject.com/KB/tips/ModelViewController.aspx using wget, so I simply used the really basic command:

wget http://www.codeproject.com/KB/tips/ModelViewController.aspx

What I received was a file with the .aspx extension, which could not be displayed correctly in a regular browser.

How can I download that web page?

like image 937
Tracy Avatar asked Jun 09 '11 12:06

Tracy


1 Answers

Courtesy of the wget manual page (first result of a web search on "wget options", btw):

wget -E http://whatever.url.example.com/x/y/z/foo.aspx

If you also wish to download all related media (CSS, images, etc.), use -p, possibly with --convert-links (rewrites the page for offline viewing):

wget -Ep --convert-links http://whatever.url.example.com/x/y/z/foo.aspx
like image 157
Piskvor left the building Avatar answered Oct 24 '22 14:10

Piskvor left the building