我想取得某一网页的Html,比如http://www.cctv.com/default.shtml
只要html text,不要图像,flash等不要用webBrowser,它会下载所有的内容,速度太慢,请问其他最简单的方法。
请给一段示例代码,谢谢!
只要html text,不要图像,flash等不要用webBrowser,它会下载所有的内容,速度太慢,请问其他最简单的方法。
请给一段示例代码,谢谢!
调试欢乐多
dim s as string
s=Inet1.OpenURL("http://www.cctv.com/default.shtml")
msgbox s
Inet1.Execute "http://www.cctv.com/default.shtml"Private Sub Inet1_StateChanged(ByVal State As Integer)
Select Case State
Case icResponseCompleted
Dim vtData As Variant '数据变量。
Dim strData As String: strData = ""
Dim bDone As Boolean: bDone = False '取得第一块。
vtData = Inet1.GetChunk(1024, icString)
DoEvents
Do While Not bDone
strData = strData & vtData
DoEvents
'取得下一块。
vtData = Inet1.GetChunk(1024, icString)
If Len(vtData) = 0 Then
bDone = True
End If
Loop msgbox strData
End Select
End Sub