I am trying to build a workbook to track the statistics of the starters for each NBA team. I have the following code to open each player's webpage but when I look at the ResponseText, I don't see the stats anywhere. Can someone give me some guidance.
here is one of the websites. I want to pull the line which shows the statistics for the current season.
http://sports.espn.go.com/nba/players/profile?statsId=3266
Here is the code i have so far:
Thanks for the help.
here is one of the websites. I want to pull the line which shows the statistics for the current season.
http://sports.espn.go.com/nba/players/profile?statsId=3266
Here is the code i have so far:
Code:
Sub GetStats()
Dim xmlhttp, cl As Range, rng As Range
Dim strURL As String, RtnPage As String
'Create the XML document type
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
'Get my range of the stock quotes
Set rng = Range("C2:C3")
For Each cl In rng
'Check to see if Cell has a link to the players page
If cl.Hyperlinks.Count > 0 Then
'Open a connection to the server and get the Player's Statistics
strURL = cl.Hyperlinks.Item(1).Address
'get the strURL
xmlhttp.Open "GET", strURL, False, "", ""
'send the information
xmlhttp.Send
RtnPage = xmlhttp.ResponseText
Debug.Print RtnPage
End If
Next cl
End Sub
Thanks for the help.