Predmet:Re:VBA scraping
Nece niko ni da proba.
PreuzmiIzvorni kôd (Visual Basic):Function test()
the_start:
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Top = 0
objIE.Left = 0
objIE.Width = 800
objIE.Height = 600
objIE.Visible = False 'We will see the window navigation
On Error Resume Next
objIE.Navigate ("https://icentar.ba/icentar/showtopic.php?id=22")
Do
DoEvents
If Err.Number <> 0 Then
objIE.Quit
Set objIE = Nothing
GoTo the_start:
End If
Loop Until objIE.ReadyState = 4
Dim AllString As String
Set Alllinks = objIE.Document.getElementsByTagName("div")
For Each Hyperlink In Alllinks
ime = Hyperlink.className
If ime = "bbody iefix_left" Then
AllString = Hyperlink.innerText
MsgBox AllString
MsgBox Hyperlink.Name
'Exit For
End If
Next
Set objIE = Nothing
End Function
Podrska samo putem foruma, jer samo tako i ostali imaju koristi od toga.