Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBScript to pull html source code
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!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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!! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBScript to pull html source code
Tom - THANK YOU!!
"Tom Ogilvy" wrote: 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!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I import raw HTML source code into Excel? | Excel Programming | |||
Macro to pull info from html page | Excel Discussion (Misc queries) | |||
How to pull specific data from HTML? | Excel Programming | |||
looking for html to pull series of urls | Excel Programming | |||
Calling HTML Source code from within VBA for Excel | Excel Programming |