I'm trying to extract information from this URL https://www.zillow.com/webservice/GetSearchResults.htm?zws-id=X1-ZWz18hxnbvw0ej_40oka&address=2912%20WEST%201ST%20STREET%20UNIT%201&citystatezip=Jacksonville%20FL%2032254
The information I want to extract is 102557, it can be found from this portion of the XML URL:
<zestimate>
<amount currency="USD">102557</amount>
I'm using this code to extract it and its giving me an "Object variable or With block variable not set" error message.
Sub GetInfo2()
Dim Http As New XMLHTTP60, Html As New HTMLDocument
Dim lastrow As Long, i As Long
Dim sdd As String
Dim add As Variant
Dim url As Range
i = 2
For Each url In Range(Cells(3, "M"), Cells(Rows.Count, "M").End(xlUp))
With Http
.Open "GET", url, False
.send
Html.body.innerHTML = .responseText
End With
sdd = Html.querySelector("span[class='zsg-tooltip-launch_keyword']")(0).innerText
i = i + 1
DD.Cells(i, "J") = sdd
Next url
End Sub
Try this, it worked for me. You'll just need to modify it slightly to work for you ...
... obviously I stripped it back to the raw call so I could target the specifics.
This also works ...
... just be careful with that one though.