如何将网页(包括图像)保存为.html页面 [英] How to save webpage(including Image) as .html page

查看:362
本文介绍了如何将网页(包括图像)保存为.html页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai,



我使用此代码将网页保存为.html页面



Dim LocalFilePath As String =D:\ Jaison \ _profile.html

Dim objWebClient As New System.Net.WebClient

objWebClient.DownloadFile(http:// localhost :62377 / ppp.aspx,LocalFilePath)



但是图像文件没有保存在html页面中。



显示没有图像可用。



帮助我完成这项任务。



提前谢谢....

解决方案

这是 Web抓取的问题: http://en.wikipedia.org/wiki/Web_scraping [ ^ ]。



在问题评论中,ryan31正确解释了获取图像所需的内容文件。

另外,请看看我过去的答案:

获取具体数据来自网页 [ ^ ],

如何从其他网站获取数据 [ ^ ]。



-SA

Hai,

I saved a webpage as .html page using this code

Dim LocalFilePath As String = "D:\Jaison\profile.html"
Dim objWebClient As New System.Net.WebClient
objWebClient.DownloadFile("http://localhost:62377/ppp.aspx", LocalFilePath)

But the Image file is not saved in the html page.

It shows that No Image available.

Help me to do this task.

Thanks in advance....

解决方案

This is a problem of Web scraping: http://en.wikipedia.org/wiki/Web_scraping[^].

In the comment to the question, ryan31 correctly explained what do you need to get the image file.
Also, please see my past answers:
get specific data from web page[^],
How to get the data from another site[^].

—SA


这篇关于如何将网页(包括图像)保存为.html页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆