Using the below script I'm successfully returning values from the HTML tables into the workbook from the following links: link1 and link2. But when I'm trying to use the same script for the following link3, it does not return anything back. I think it is due to complex HTML table structure existing on the website. I believe code requires .Item(0) number to be adjusted due to table complexity, please advice.
Sub Web_Data()
Dim http As New XMLHTTP60, html As New HTMLDocument
Dim topic As HTMLHtmlElement
With http
.Open "GET", "http://www.dolphinfitness.co.uk/en/optimum-nutrition/", False
.send
html.body.innerHTML = .responseText
End With
For Each topic In html.getElementsByClassName("category-products")
With topic.getElementsByClassName("product-name")
If .Length Then x = x + 1: Cells(x, 1) = .Item(0).innerText
End With
With topic.getElementsByClassName("price")
If .Length Then Cells(x, 2) = .Item(0).innerText
End With
Next topic
End Sub