Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sub ScrapeCarDataPt1()
Dim IE As InternetExplorer
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate "https://carousell.com/categories/cars-32/cars-for-sale-1173/"
Do While IE.ReadyState <> READYSTATE_COMPLETE: Loop
Dim CarListings As IHTMLElementCollection
Dim CarListing As IHTMLElement
Set CarListings = IE.Document.body.getElementsByClassName("col-lg-3 col-md-4 col-sm-4 col-xs-6")
For Each CarListing In CarListings
Debug.Print CarListing.innerText
Next CarListing
IE.Quit
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment