based :
how to click o each city, waith for new page. and get data from comune and codice catastale...
how to click o each city, waith for new page. and get data from comune and codice catastale...
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub Scrape()
Dim Browser As InternetExplorer, Document As HTMLDocument, Elements
Dim Element As IHTMLElement, DOC, I%, R As Range
Set R = [a2]
Set Browser = New InternetExplorer
Browser.Visible = True
Browser.navigate "[URL unfurl="true"]https://www.codiceinverso.it/elenco-codici-catastali.html"[/URL]
Do While Browser.Busy And Not Browser.readyState = READYSTATE_COMPLETE
DoEvents
Loop
Set DOC = Browser.Document
Set Elements = DOC.getElementsByTagName("a")
For I = 0 To Elements.Length - 1
Debug.Print Elements(I).textContent
If Elements(I).textContent = "li" Then
MsgBox "found"
Elements(I).Click
End If
Next
MsgBox Elements.Length, , "elements"
End Sub