IM试图从tr标签的国家,但它只是给我的表的第一行我怎么刮的特定行HTML表格刮使用VBA
Sub ipsearch()
Dim x As Integer
x = 2
Do Until x = 4000
Dim ie As New InternetExplorer
ie.navigate "https://whatismyipaddress.com/ip/" & Range("E" & x).Value
Do
DoEvents
Loop Until ie.readyState = READYSTATE_COMPLETE
Dim doc As HTMLDocument
Set doc = ie.document
Dim sDD As String
sDD = Trim(doc.getElementsByTagName("td")(, 0).innerText)
Range("F" & x).Value = sDD
x = x + 1
Loop
End Sub
谢谢你我会和我一起尝试你的版本 – yusuf