VBScript to pull html source code
code previously posted by Jake Marx:
Sub Demo()
Dim ie As Object
Dim sWholeFile As String
Dim asLineByLine() As String
Dim lLine As Long
Set ie = CreateObject("InternetExplorer.Application")
ie.Navigate "http://www.longhead.com/"
Do While ie.Busy And Not ie.ReadyState = 4
DoEvents
Loop
sWholeFile = ie.Document.body.innerhtml
ie.Quit
Set ie = Nothing
asLineByLine = Split(sWholeFile, vbCrLf)
For lLine = LBound(asLineByLine) To UBound(asLineByLine)
Sheet1.Cells(lLine + 1, 1).Value = asLineByLine(lLine)
Next lLine
End Sub
--
Regards,
Tom Ogilvy
"Nixter" wrote in message
...
I am running a script on a vendor's website and searching for missing
images
(whereby the imagename is always a blank jpg named 'imageNA.jpg').
I have the logic to pull the actual site with variables handling the parts
of the URL - I am trying to grab the source code and logically step thru
to
see which images are blank (this is for about 900,000 products).
Is there Excel vbscript to pull just the html source code out there?
thanks!!
|