Selected Answer
Tony
I couldn't get fixtures from that site but I modified the tutorial code to get the first game today from the BBC football website using this code (modifed website appears in the first bold line and the details between the next two bold lines have been tweaked)::
Sub Get_Web_Data()
' TeachExcel.com
Dim request As Object
Dim response As String
Dim html As New HTMLDocument
Dim website As String
Dim price As Variant
' Website to go to.
website = "https://www.bbc.co.uk/sport/football/scores-fixtures"
' Create the object that will make the webpage request.
Set request = CreateObject("MSXML2.XMLHTTP")
' Where to go and how to go there - probably don't need to change this.
request.Open "GET", website, False
' Get fresh data.
request.setRequestHeader "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT"
' Send the request for the webpage.
request.send
' Get the webpage response data into a variable.
response = StrConv(request.responseBody, vbUnicode)
' Put the webpage into an html object to make data references easier.
html.body.innerHTML = response
' Get the teams from the specified element on the page.
Home = html.getElementsByClassName("gs-u-display-none gs-u-display-block@m qa-full-team-name sp-c-fixture__team-name-trunc").Item(0).innerText
Away = html.getElementsByClassName("gs-u-display-none gs-u-display-block@m qa-full-team-name sp-c-fixture__team-name-trunc").Item(1).innerText
' Output the fixture in a message box.
Fixtures = Date & " Fixtures:" & Chr(13) & Home & " v " & Away
MsgBox Fixtures
End Sub
Try that (today) and you should get the message:
19/01/2021 Fixtures:
West Ham United v West Bromwich Albion
If you change the bold 0 and 1 (in lines starting Home and Away) to 2 and 3, today you'll get:
19/01/2021 Fixtures:
Leicester City v Chelsea
I don't know how yet how to loop through all the similar classes but you have a starter hopefully.
p.s. League 2 is my home!