vb获取网页部分文本
Function GetPageText(Url As String) As String
Dim Browser As InternetExplorer
Dim Document As HTMLDocument
Dim Doc As HTMLDocument
Dim Elements As IHTMLElementCollection
Dim Element As IHTMLEle
Set Document = New HTMLDocument
Set Doc = Document.createDocumentFromUrl(Url, vbNullString)
Do Until Doc.ReadyState = “complete”
DoEvents
Loop
Set Element = Doc.getElementById(“content_views”)
GetPageText = Element.innerText
Set Document = Nothing
End Function