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