In the browser, when you save the page, you can select "Save page (completely)". As a result: the .html file and folder with all resources is saved. Will HtmlAgilityPack fit? And, if so, how to implement it? 
|
1 answer
Will HtmlAgilityPack fit?
With the help of HtmlAgilityPack in html you can find all the tags img. For each read the attribute src, which may be the url of the image or data:image/svg+xml,<svg....
After that, you need to download pictures, save them to files. And in html, replace the src values with file names. And save the html file.
An example for searching and downloading pictures is here .
The following situation is possible: the images are visible in the browser, and if you load the page and parse it into HtmlAgilityPack, then there are no images.
The reason is that when a page is loaded into a web browser, the images can be loaded with JavaScript.
- The problem is that not all src are found. I already wrote about this in this thread - Andrey Dudukin
- @ program23 "not all src are found." - this is possible if the images are loaded with javascript. I added the answer. - Stack
|