网页抓1页的代码有了,翻页抓1-7页谁来帮帮忙?感谢
Sub t()Dim html As Object, http As Object, i, n, j
n = 2
Set html = CreateObject("htmlfile")
Set http = CreateObject("Msxml2.XMLHTTP")
http.Open "GET", "http://www., False
http.send
html.body.innerhtml = http.responseText
Set tb = html.body.getelementsbytagname("tr")
For i = 1 To tb.Length - 1
n = n + 1
For j = 0 To tb(i).ChildNodes.Length - 1
Cells(n, j + 1) = tb(i).ChildNodes(j).innertext
Next
Next
End Sub
