shahin
Active Member
Hi there all! Creating a scraper for the purpose of parsing the title of different products from a webpage when I run it, I get nothing. What I could see that the desired contents are within javascript element. As I don't wanna use any converter to harvest those titles, I expect somebody to help me get that using dictionary. What I tried initially was this:
Code:
Sub RmartData()
Dim http As New XMLHTTP60, html As New HTMLDocument
Dim titelem As Object, title As Object, protitle As Object
With http
.Open "GET", "https://redmart.com/bakery", False
.send
html.body.innerHTML = .responseText
End With
Set titelem = html.getElementsByClassName("description")
For Each title In titelem
Set protitle = title.getElementsByTagName("a")
x = x + 1
Cells(x, 1) = protitle(0).innerText
Next title
End Sub