Click to See Complete Forum and Search --> : Help with saving HTML file using command line


aahuja
07-15-2005, 06:02 AM
Hi,

I am trying to find a way to save a HTML file the way you do save as web page, complete in Internet Explorer, but i need to do it from command line as I want to use it in a shell script. I am not sure which tools are available and how to do it...Please help.

thanks,
Amit

deathadder
07-15-2005, 06:24 AM
Have a look at 'wget'

aahuja
07-15-2005, 07:08 AM
Wget doesnt does the same function as web page, complete under IE. It works similar to save web page, html.
Please suggest something else, or incase you know how to do this using wget, lemme know.

thanks,
amit


Have a look at 'wget'

Hayl
07-15-2005, 08:16 AM
could you explain what wget does not do that saving a page from IE does do? also have you read the man page for wget to make sure that there is not a command-line switch to change the default behaviour of wget so that it does do what you want it to do?

ph34r
07-15-2005, 09:28 AM
Heck, you can mirror entire sites using wget. Check the man page or the --help options

aahuja
07-15-2005, 12:17 PM
I am trying to save this page http://www.sigalert.com/speeds.asp?Region=LA+West&Road=5%20South
please see that it has some data on speeds, Wget would not save the data. I need the page with all the data on my disk so that i can parse it using a script, so i need a command line based downloader which can also be included in the script.

thanks
Amit

chrism01
07-18-2005, 03:05 AM
If you don't mind a bit of programming, try the Perl modules LWP & HTTP. They are designed to do exactly this sort of thing eg google for Perl Cookbook, Chap 20; Web Automation for examples or search.cpan.org for the modules themselves.