shahin
Active Member
Hi there! Hope you all are doing well. I got a website where I can't place my search inputs using vba to get populated data. So far when I worked with "GET" request method with inputs, I found "name" option to place accordingly in "Postdata" section (Seeing my pasted code below you will get to know what i meant by Postdata) to perform a successful search. But, this time working with some site "https://proadvisor.intuit.com/app/accountant/search?region=US" I can't find any such option I'm familiar with. If anyone helps me on this, I'll really be grateful to him. Thanks in advance.
Criteria to be fulfiled to perform a search:
1.Location ------------>Sutton-Alpine, AK
2.Industry served--------->Non Profit
3.Service Provided---------->Audits/reviews/compilations
4.Product supported--------->QuickBooks Online Edition
5.Distance within------------>25 miles
Criteria to be fulfiled to perform a search:
1.Location ------------>Sutton-Alpine, AK
2.Industry served--------->Non Profit
3.Service Provided---------->Audits/reviews/compilations
4.Product supported--------->QuickBooks Online Edition
5.Distance within------------>25 miles
Code:
Sub WebData()
Dim http As New MSXML2.XMLHTTP60, html As New HTMLDocument
Dim PostData As String, elems As Object, elem As Object
With http
PostData = ""
http.Open "GET", "https://proadvisor.intuit.com/app/accountant/search?region=US" & PostData, False
http.setRequestHeader "Content-Type", "text/xml"
http.send
html.body.innerHTML = .responseText
End With
Set elems = html.getElementsByClassName("accountant-name")
For Each elem In elems
x = x + 1
Cells(x, 1) = elem.innerText
Next elem
End Sub