Results 1 to 11 of 11

Thread: [RESOLVED] Grab Links from Webpage

Threaded View

  1. #5
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    Re: Grab Links from Webpage/HTML source

    RS

    Maybe something like this:

    Code:
    Text2.Text = WebBrowser1.Document.documentelement.innerhtml
    FindText = Split(Text2.Text, vbCrLf)  ' uses vbCrLf instead of what you had
    nn = UBound(FindText)                 ' num elements in array FindText
    tagb = "<IMG"                         ' begin tag
    tage = "</IMG"                        ' end tag
    For ii = 0 to nn
        b = InStr(UCase(FindText, tagb)   ' beginning pos of tagb
        e = InStr(UCase(FindText, tage)   ' beginning pos of tage
        If b > 0 Then                     ' only interested if have tagb in this given string
            < code parse based on b and e >
        End If
    Next ii
    Does this get you started?
    FWIW, I noticed that tags seem to use "<" instead of "[".

    EDIT:
    As you may have guessed, I'm not too familiar with html codes.
    Looks like I was wrong:

    Replace: tagb = "<IMG"
    .... with: tagb = "[IMG"

    ... and ditto with tage

    Spoo
    Last edited by Spoo; Jun 5th, 2010 at 11:19 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width