灵活变通,参考
Dim web = e.Form.controls("webbrowser1").basecontrol
web.ScriptErrorsSuppressed = True
web.Navigate("http://toutiao.com/m6114233861/")
Do Until web.ReadyState = 4
Application.DoEvents
Loop
Do Until web.DocumentText.contains("没有更多啦")
web.Document.Window.ScrollTo(0, 0)
web.Document.Window.ScrollTo(0, web.Document.Body.ScrollRectangle.Height)
Application.DoEvents
Loop
Dim lis = web.Document.GetElementById("content-left").GetElementsByTagName("li")
Dim str As String = ""
For i As Integer = 0 To lis.count-1
Dim lsa = lis(i).GetElementsByTagName("a")
For Each a As object In lsa
If a.GetAttribute("className") = "title-box link" Then
str &= a.InnerHtml & vbcrlf
str &= a.GetAttribute("href") & vbcrlf
Dim lsspan = lis(i).GetElementsByTagName("span")
str &= lsspan(0).InnerHtml & " " & lsspan(1).InnerHtml & " " & lsspan(2).InnerHtml & vbcrlf & vbcrlf
End If
Next
Next
e.Form.controls("textbox1").text = str