4
votes

I need to save web page using Qt WebKit similar to "Save as complete webpage".

Following are my requirements,

  1. Save the index html file, maintaining entity encoding.
  2. Need to download all linked images and other resources.
  3. Need to change resource path in html page to local downloaded path.
  4. Need to maintain webpage current state.

I can use Qt and JavaScript to do this.

Please provide me some inputs on this.

Thanks

2

2 Answers

0
votes

You could use a HTML parser to parse the current page, then look for all the images (xpath "//img"), download their files, and change their src attributes.

0
votes

how about save the html to local system and call setHtml() when you need it?