Sub
Seite_Aufrufen()
If
ActiveSheet.Range(
"A1"
) =
""
Then
Exit
Sub
Call
Test_Seite(ActiveSheet.Range(
"A1"
).Text)
End
Sub
Private
Sub
Test_Seite(
ByVal
strSearch
As
String
)
Dim
appIE
As
Object
, strTemp
As
String
, varTemp
As
Variant
Dim
ele
As
Object
, objEle
As
Object
, k
As
Integer
Set
appIE = CreateObject(
"InternetExplorer.Application"
)
appIE.Visible =
False
Do
:
Loop
Until
appIE.Busy =
False
Do
:
Loop
Until
appIE.Busy =
False
With
appIE.Document
Set
objFound = .getelementsbyclassname(
"srp-listing-title"
)
Dim
i
As
Integer
For
Each
ele
In
objFound
ActiveSheet.Cells(1, 1) = ele.innertext
ele.Click
Exit
For
Next
ele
Set
objFound =
Nothing
Do
:
Loop
Until
appIE.Busy =
False
Do
:
Loop
Until
appIE.Busy =
False
Application.Wait (Now() + TimeSerial(0, 0, 2))
Set
objFound = .getelementsbyclassname(
"narrative-component narrative-content"
)
i = 0
For
Each
ele
In
objFound
i = i + 1
ActiveSheet.Cells(2 + i, 1) = ele.innertext
Next
ele
End
With
appIE.Quit
Set
objFound =
Nothing
Set
appIE =
Nothing
End
Sub