- Set ie = CreateObject("InternetExplorer.Application")
- ie.Visible = true
- ie.navigate "http://lolbox.duowan.com/playerDetail.php?serverName=%E5%AE%88%E6%9C%9B%E4%B9%8B%E6%B5%B7&playerName=%E6%88%91%E6%98%AF%E4%BB%96%E5%B9%B2%E7%88%B9"
-
- Do
- WSH.Sleep 500
- Loop Until ie.readyState = 4
-
- info = ""
- For Each div in ie.Document.getElementsByTagName("div")
- If div.className = "text" Then info = info & replace(div.innerText, vbCrLf, " ")
- If div.className = "fighting" Then info =info & " " & replace(div.innerText, vbCrLf, " ") & vbCrLf
- If div.className = "com-hero" Then
- info = info & div.getElementsByTagName("h3")(0).innerText & ":" & vbCrLf
- For Each img in div.getElementsByTagName("img")
- info = info & img.src & vbCrLf
- Next
- End If
- If div.className = "mod-tabs" Then
- Set table = div.getElementsByTagName("table")
- For Each td in table(0).getElementsByTagName("tr")(1).getElementsByTagName("td")
- info = info & td.innerText & " "
- Next
- info = info & vbCrLf
- For Each td in table(1).getElementsByTagName("tr")(1).getElementsByTagName("td")
- info = info & td.innerText & " "
- Next
- End If
- Next
- msgbox info
- ie.quit
复制代码
|