LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save html page including images!!!!

Hi there,
i would like to save a list of htmlpages including
the images. my problem is, that the "url get http documen vi" saves only the text.

the webpages i try to save are output pages retrieved from a database. each request takes up to 4 minutes
as the generated output is cpu intensive
( i think you understand wy i want to save the page then 🙂

all the request have been generated in labview but unfortunately the saving of the html files does not work
( also tried....data socket get without success )

have you any ideas?
thanks in advance

Ivo
0 Kudos
Message 1 of 3
(4,179 Views)
You can retrieve any http document on the Internet. For example you could retrieve "http://www.ni.com/images/legal/us/nilogo1.gif" which is LabVIEW image from the NI Website. When you download a web page with this tool, you only get the html document, because that is what you asked for. This document embeds images, which most web browsers will download automatically and place within the formatted page. What you will need to do is retrieve the html document, parse it for all embedded image files and then download them one at a time. This is sort of what a "web spider"/"web crawler"/"web bot" does, except they mostly just parse out other pages and then visit those sites collecting information of interest.

Best of Luck - Jim
0 Kudos
Message 2 of 3
(4,179 Views)
I started writing the attached code before Jim Kring answered. I used ideas he suggested. My program saves the HTML, then it parses out the infor for the images paths from the HTML. The path to the images is then created and the file downloaded. Finally I replace the tag in the original html with a path to where the file is stored locally. The code is far from finished but should be good start.

Jeremy
Message 3 of 3
(4,179 Views)