shahin
Active Member
I've built a scraper to parse data from a website. My scraper is doing well. However, the result I'm having comes in a single line whereas I wish to have them like a list. The below attached image will let you understand what I meant. Thanks for any help on this.
This is what I've tried so far:
This is what I've tried so far:
Code:
Sub edmunds()
Dim IE As New InternetExplorer, HTML As HTMLDocument
Dim elem As Object
With IE
.Visible = False
.navigate "https://www.edmunds.com/ford/escape/2017/cost-to-own/?zip=43215"
Do While .Busy = True Or .readyState <> 4: DoEvents: Loop
Application.Wait Now + TimeValue("0:00:05")
Set HTML = .document
End With
For Each elem In HTML.getElementById("tco_detail_data").getElementsByTagName("li")
Debug.Print elem.innerText
Next elem
IE.Quit
End Sub
Attachments
Last edited: