How to save a web page in Qt WebKit as "save as full web page"

I need to save a webpage using Qt WebKit, similar to "Save as full webpage".

Below are my requirements,

  • Save the html index file that supports object encoding.
  • You must download all related images and other resources.
  • You must change the resource path on the html page to the local loaded path.
  • You must maintain the current state of the web page.

I can use Qt and JavaScript for this.

Please provide me some material on this.

thanks

+4
source share
2 answers

You can use the HTML parser to parse the current page, then search all the images (xpath "// img"), upload their files and change their src attributes.

0
source

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

0
source

Source: https://habr.com/ru/post/1311695/


All Articles