ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Commandline method of downloading a webpage

<< < (2/3) > >>

4wd:
This VBS script from StackOverflow worked fine here from the command line.

NOTE: You do need IE to be installed.

eg.
--- Code: Text ---cscript SaveAsMHT.vbs https://www.donationcoder.com K:\test.mhtGave a .mht file that could be opened in IE with the DC home page.

Considering you're talking about a single page capture it might be easier than using wget.

wraith808:
Does that MHT go offsite?  Or is it all contained?  I'd guess that everything for DC is onsite, so maybe that's not apparent.  When I used to use MHT, I'd end up dropping offsite resources.

4wd:
Quite likely but he said it was a single page website on a local server he wanted to archive so it may be suitable, possibly no offsite links to worry about.

questorfla:
This VBS script from StackOverflow worked fine here from the command line.

NOTE: You do need IE to be installed.

eg.
--- Code: Text ---cscript SaveAsMHT.vbs https://www.donationcoder.com K:\test.mhtGave a .mht file that could be opened in IE with the DC home page.

Considering you're talking about a single page capture it might be easier than using wget.
-4wd (June 20, 2016, 08:11 AM)
--- End quote ---
Sigh~ :huh: line 1 char 23 expected end of statement
Duh missed the part about getting the original script I figured it was one of your best one-liners.
Forget anything bad I ever said about you 4wd (tho I never did!)  the darn thing worked!!

>>And Yes, it beats the heck out of Wget which I never could  get to return everything exactly like it showed on  the web.  Script is Perfect!

questorfla:
IanB  This did the trick for me!

"If you find a way to initiate WebPageDump or any other script to download a webpage, from the command line, then I'd be very interested to know how you did it please."

I am sure you already tried 'httrack' as that is my preferred "full-court-press" site backup. 
But I did not need a backup I needed a single file document and this did it!!



What I had was a php script used as the index.php file in a website that was dedicated only to making a specific type of layout of images linked to webpages.
Like a visual website menu.  But they wanted a document that could be emailed to people they wanted to have it and not have them going to the website that created the document to start with.

Anyway, the odds of you needing it for what I needed it for are less than zero.
Suffice it to say that 4WD came through (as usual though I think he has helpers at Stack overflow as I can Never find the codes he does).
Running the command line exactly as stated exchanging the webpage you want and place you wan t it stored makes a perfect mht file that includes the exact images along with their html presentation aspect plus the correct hypelinks.
In other words, it look and acts exactly as if the user were on that page

In all fairness, every element needed WAS on the page I created from so no elements from offsite are include as they are not needed.
But it would be worth experimenting to see if it might suit your needs as well

Thanks 4wd.
With luck, maybe I can drop in in a few months and bring a few shrimp for the barby eh?
(More like a porterhouse though!)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version