Moderatori: Anthony47, Flash30005
=IMPORTXML(A2;"//*[@id=""component_35""]/div/div[3]/span[1]/span/a")
=IMPORTXML(A2;"//span[@class=""_15QfMZ2L""]")
=IMPORTXML(A2;"//*[@id=""component_35""]/div/div[3]/span[3]/span/a/@href")
=IMPORTXML(A2;"//*[@id=""component_36""]/div[2]/div/div[3]/div/div/div[2]/div[2]/span/a/@href")
=IMPORTXML(A2;"//*[@id=""component_36""]/div/div/div[3]/div/div/div[2]/div[1]/span/a")
=IMPORTXML(A2;"//*[@id=""SAFETY_ANCHOR""]/div/div/div/div[2]/div[1]/div[2]/div[2]/div[1]/div[3]/a/@href")
=IMPORTXML(A2;"//*[@id=""component_36""]/div[2]/div/div[3]/div/div/div[2]/div[1]/span/a/@data-encoded-url")
=IMPORTXML(A2;"//*[@id=""component_36""]/div[2]/div/div[3]/div/div/div[2]/div[1]/span/a/@class")
=IMPORTXML(A2;"//*[@id=""component_36""]/div[2]/div/div[3]/div/div/div[2]/div[1]/span/a/@target")
=IMPORTXML(A2;"//*[@id=""component_36""]/div[2]/div/div[3]/div/div/div[2]/div[1]/span/a/@*")
Dim IE As Object
#If VBA7 Then '!!! ON TOP OF THE VBA MODULE !!!!
Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As LongPtr)
#Else
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
#End If
Sub TripAd()
''Dim IE As Object
Dim myDoc, myF
Dim oColl, Out(1 To 8) As String
myUrl = Cells(2, 1).Value 'L'url della pagina da accedere
For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row
If InStr(1, myUrl, "http", vbTextCompare) = 1 Then
If IE Is Nothing Then Set IE = CreateObject("InternetExplorer.Application")
mystart = Timer
With IE
.Visible = True '... rendi visibile IE
.Navigate myUrl '...vai all'url
Sleep 50
Do
DoEvents: Sleep (30)
If .busy = False Then Exit Do
Loop 'Attesa not busy
Do While .ReadyState <> 4: DoEvents: Sleep (30)
Loop 'Attesa documento
End With
Erase Out
On Error Resume Next
Out(1) = IE.document.getElementsByClassName("_3a1XQ88S")(0).innerText
Out(2) = IE.document.getElementsByClassName("_2saB_OSe")(0).innerText
Out(4) = IE.document.getElementsByClassName("_2saB_OSe")(1).parentElement.href
Out(5) = IE.document.getElementsByClassName("_2saB_OSe")(2).parentElement.href
Out(3) = IE.document.getElementsByClassName("_2saB_OSe")(3).parentElement.parentElement.href
Out(6) = IE.document.getElementsByClassName("_1XLfiSsv")(0).innerText
Out(7) = IE.document.getElementsByClassName("_1XLfiSsv")(1).innerText
Out(8) = IE.document.getElementsByClassName("_1XLfiSsv")(2).innerText
Cells(i, 2).Resize(1, UBound(Out)).Value = Out
On Error GoTo 0
End If
Next i
IE.Quit
Set IE = Nothing
End Sub
#If VBA7 Then '!!! ON TOP OF THE VBA MODULE !!!!
Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As LongPtr)
#Else
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
#End If
Torna a Applicazioni Office Windows
non riesco più a mettere google come nuova pagina Autore: zaq1 |
Forum: Sistemi Operativi Windows Risposte: 6 |
Visitano il forum: Nessuno e 13 ospiti