What I want to do is access the source of web page and pick out some of the information with vbs.
I have tried using something along the lines of -
Set objExplorer = createobject("internetexplorer.application")
objExplorer.Visible = False
objExplorer.navigate "
While (objExplorer.readystate <> 4)
Wscript.Sleep 10
Wend
strHTML = objExplorer.document.body.outerHTML
objExplorer.quit
arrHTML = Split(strHTML, vbCrLf)
For intLoop = 0 to UBound(arrHTML, 1)
WScript.Echo arrHTML(intLoop)
Next
which seems to get all of the data. However, it doesn't appear the same as if I browsed to the page and went through View / Source. There seem to be extra tags, and whitespace is all rearranged.
Can anyone tell why this is, and if it's possible to do similar but to get the source as it appears when I view it in notepad from Internet Explorer (or even save the page to my hard disk and open it in Notepad)?
If anyone could explain what's going on, it would be greatly appreciated!
Cheers,
Dan.
I have tried using something along the lines of -
Set objExplorer = createobject("internetexplorer.application")
objExplorer.Visible = False
objExplorer.navigate "
While (objExplorer.readystate <> 4)
Wscript.Sleep 10
Wend
strHTML = objExplorer.document.body.outerHTML
objExplorer.quit
arrHTML = Split(strHTML, vbCrLf)
For intLoop = 0 to UBound(arrHTML, 1)
WScript.Echo arrHTML(intLoop)
Next
which seems to get all of the data. However, it doesn't appear the same as if I browsed to the page and went through View / Source. There seem to be extra tags, and whitespace is all rearranged.
Can anyone tell why this is, and if it's possible to do similar but to get the source as it appears when I view it in notepad from Internet Explorer (or even save the page to my hard disk and open it in Notepad)?
If anyone could explain what's going on, it would be greatly appreciated!
Cheers,
Dan.