|
- Sub Getall()
- Dim ie, temp As String, s() As String, arr() As String
- On Error Resume Next
- Set ie = CreateObject("InternetExplorer.Application")
- With ie
- .Visible = False
- For j = 1 To 65
- .navigate "http://www.popmoon.com/word100/fastword/danci.asp?ViewArea=204&page=" & j, False
- Do Until .readyState = 4
- DoEvents
- Loop
- temp = .document.body.innerhtml
- Debug.Print temp
- ReDim arr(1 To 100, 1 To 3)
- s = Split(temp, "<td width=150>", , vbTextCompare)
- For i = 3 To UBound(s) Step 2
- arr((i - 3) \ 2 + 1, 1) = Split(s(i), "<", , vbTextCompare)(0)
- arr((i - 3) \ 2 + 1, 2) = Split(Split(s(i + 1), "str2img(", , vbTextCompare)(1), ");")(0)
- arr((i - 3) \ 2 + 1, 3) = Split(Split(s(i + 1), "<td width=397>", , vbTextCompare)(1), "<")(0)
- Next
- [a65536].End(xlUp).Offset(1, 0).Resize(100, 3) = arr
- Next
- End With
- ie.Quit
- End Sub
复制代码 |
|