I need to be able to automate data scraping of property assessment data for work, and I keep getting Error 70: Permission Denied. The weird thing is that for testing purposes, I left IE visible and the page navigates correctly, but the debug error stops a process that seems to be working. I have Microsoft Internet Controls activated & I am running IE 10. Below is my code:
This is the line that is getting the error:
Originally, I was navigating directly to the Property Search tab, but the website blocked me for "bookmarking the property search rather than navigating from the home page" (probably an effort to prevent data scraping haha). The thing that is throwing me off is that the macro IS clicking the link and delivering the Property Search page, but then it stops because VBA thinks that it did not work... Does anyone know how to fix this? (preferably a method that does not require Selenium or other 3rd party resources)
Thanks to anyone that can help!
Mitch
Code:
Sub Hamilton_OH()
Set ie = CreateObject("InternetExplorer.Application")
Dim Street As String
Dim ele As Object
Street = Range("C4").Value
'<-----------Jump to County Assessor Property Search----------->
With ie
.Visible = True
.Navigate "http://www.hamiltoncountyauditor.org"
Do While .Busy Or .ReadyState <> 4
DoEvents
Loop
'<-----------Navigate to Property Search----------->
For Each ele In ie.document.all
If InStr(ele.innerHTML, "Property Search") > 0 Then ele.Click
Next
'<-----------Search for Street Name----------->
Set ipf = ie.document.all.Item("streetname")
ipf.Value = Street
For Each ele In ie.document.getElementsByTagName("td")
If InStr(ele.innertext, "go") > 0 Then ele.Click
Next
End With
End Sub
This is the line that is getting the error:
Code:
If InStr(ele.innerHTML, "Property Search") > 0 Then ele.Click
Originally, I was navigating directly to the Property Search tab, but the website blocked me for "bookmarking the property search rather than navigating from the home page" (probably an effort to prevent data scraping haha). The thing that is throwing me off is that the macro IS clicking the link and delivering the Property Search page, but then it stops because VBA thinks that it did not work... Does anyone know how to fix this? (preferably a method that does not require Selenium or other 3rd party resources)
Thanks to anyone that can help!
Mitch