Dushyant Gupta
New Member
Hi all,
I am trying to scrap list of VBA course items given at the right pane of the following link "www.tutorialspoint.com//vba/index.htm"
But I am unable to scrap list due to some error.
the code I have written is:
Thanks in advance
I am trying to scrap list of VBA course items given at the right pane of the following link "www.tutorialspoint.com//vba/index.htm"
But I am unable to scrap list due to some error.
the code I have written is:
Code:
Sub tutorailpointsscrap()
Dim ie As InternetExplorer
Set ie = New InternetExplorer
With ie
.navigate "https://www.tutorialspoint.com//vba/index.htm"
.Visible = True
Do While ie.readyState <> READYSTATE_COMPLETE
DoEvents
Loop
End With
Dim html As HTMLDocument
Set html = ie.document
Dim ele As IHTMLElement
Dim lists As IHTMLElementCollection
Dim row As Long
Set ele = html.getElementsByClassName("nav nav-list primary left-menu")
Set lists = ele.getElementsByTagName("li")
row = 1
For Each li In lists
Cells(row, 1) = li.innerText
row = row + 1
Next
ie.Quit
End Sub
Thanks in advance