Sub t()
For i = 2 To Cells(1048576, 1).End(3).Row
Cells(i, 2) = Trim(Replace(Replace(GetInfo(Cells(i, 1).Value), Chr(10), ""), Chr(13), ""))
Next i
End Sub
Public Function GetInfo(strMoblie) As String
Dim xmlHttp As Object, tt$
Set ohttp = CreateObject("WinHttp.WinHttpRequest.5.1")
With ohttp
.Open "GET", "https://www.365area.com/hscode/detail/" & strMoblie, False
.send
tt = .ResponseText
End With
GetInfo = Split(Split(Split(tt, "<div class=""odd green"">")(1), "<div class=""even"">")(1), "</div>")(0)
End Function
|