Getting the entire HTML source code from a web page

Chinnick

New Member
Joined
Sep 9, 2009
Messages
12
I am looking to read the source code for a website that keeps the stats for a hockey league in Sweden

For other sites i can use the code below and it works fine, but the site i am using to get the Sweden stats seem to keep the data in some type of a Java app (sorry still somewhat of a newbie) and doesn't work the same as the others

when i veiw the source code just by right clicking the page all the data i want shows up. When i try to use my code it doesn't get the stuff i want.

I have tried both objDoc.body.innerHTML and objDoc.body.outerHTML and i get different results but not the same as right clicking on the page and viewing the source, is there another command that i can use to get it all?

the website is
HTML:
http://estat.hockeyligan.se/c/LPlayersPoints.aspx?LId=195&NumberOfRows=all


Code:
Sub Get_Stats()
Const strURIpre As String = "http://estat.hockeyligan.se/c/LPlayersPoints.aspx?LId=195&NumberOfRows=all"
Set ie = CreateObject("internetexplorer.application")
ie.Navigate strURIpre
Do
If ie.ReadyState = 4 Then
ie.Visible = False
Exit Do
Else
DoEvents
End If
Loop
Set objDoc = ie.Document
Stop
strMyPage = objDoc.body.innerHTML
ie.Quit
Set objDoc = Nothing
Set ie = Nothing
End Sub

Thanks in advance
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I got a little further. It looks like there is a regular frame inside an iframe. Inside the frame is a dynamic jsp URL. If I navigate to that URL I get another URL. If I navigate to that URL and try to get the outerHTML I finally get what I was looking for. The page I actually want is one more layer deep but I think the problem is this particular webpage is a recursion nightmare.
 
Upvote 0

Forum statistics

Threads
1,215,513
Messages
6,125,256
Members
449,219
Latest member
daynle

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top