jamescooper
Well-known Member
- Joined
- Sep 8, 2014
- Messages
- 840
Hello, trying to get the price from the website:
https://www.tesco.com/groceries/en-GB/products/303105747
So would return £3.00
Any ideas, this is my attempt?
Thanks in advance!
https://www.tesco.com/groceries/en-GB/products/303105747
So would return £3.00
Any ideas, this is my attempt?
Thanks in advance!
Code:
Sub WebData()
Dim http As New XMLHTTP60, html As New HTMLDocument
Dim source As Object
With http
.Open "GET", "https://www.tesco.com/groceries/en-GB/products/303105747", False
.send
html.body.innerHTML = .responseText
End With
For Each source In html.getElementsByClassName("data-auto")
x = x + 1: Cells(x, 1) = source.getAttribute("value")
Next source
End Sub