fredrerik84
Active Member
- Joined
- Feb 26, 2017
- Messages
- 383
Hi guys i'm still working on different web puller scripts.
So I just created a little web puller code here, The plan was to just make it with an visable IE to see that everything is working then make an XML req of it. Problem however is that there are some expandable rows that needs to be opened to get the desired information/links
Here is the code:
My overall plan with this code was to make it as fast as possible so I really need this to work with an XMLHTTP60 req
Is it somehow possible to do all these steps trough an xml req? On my attempt here im stuck and I can not figure out how to handle the expandable row, anyone know how to tackle problems like this ?
Any help would be much appreciated :=9
So I just created a little web puller code here, The plan was to just make it with an visable IE to see that everything is working then make an XML req of it. Problem however is that there are some expandable rows that needs to be opened to get the desired information/links
Here is the code:
Code:
Set HTMLRows = HTMLDoc.getElementsByTagName("h3")
Set HTMLRows2 = HTMLDoc.getElementsByClassName("info-button button")
Set HTMLRows3 = HTMLDoc.getElementsByClassName("team team-a")
' Finds row and expands it
For i = 0 To HTMLRows.Length
On Error Resume Next
Cells(j, "B").value = HTMLRows(i).innerText
If HTMLRows(i).innerText = "Finland - Veikkausliiga" Then
HTMLRows(i).Click
Exit For
End If
j = j + 1
Next i
' Get link to next page
Application.Wait (Now + TimeValue("0:00:01"))
For i = 0 To HTMLRows3.Length
On Error Resume Next
Cells(j, "E").value = HTMLRows3(i).innerText
If HTMLRows3(i).innerText = "JJK" Then
MsgBox "Found " & i
Exit For
End If
j = j
next i
HTMLRows2(i).Children(0).Click
My overall plan with this code was to make it as fast as possible so I really need this to work with an XMLHTTP60 req
Is it somehow possible to do all these steps trough an xml req? On my attempt here im stuck and I can not figure out how to handle the expandable row, anyone know how to tackle problems like this ?
Any help would be much appreciated :=9