Results 1 to 3 of 3

Thread: how to get src=" " value from webbrowser controle source code ?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    how to get src=" " value from webbrowser controle source code ?

    hi all. i am loading a web page in webbrowser controle . I want to extract the value of src="" from the source code. I used the following code to get value of href="" successfully but dont know how to get value of src=""!
    i hope some one show me how to get that value src="" .


    Note: there are few src "" in the source code but i am only
    intrested in src="" value that has play.php?mediaid= on it

    HTML Code:
    <TD width="430" bgcolor="#000000" align="center" valign="top"><IFRAME src="http://www.somesite.com/videoplayer/player.php?mediaID=12345" width="430" height="348" marginwidth="0" marginheight="0"  hspace="0" vspace="0" scrolling="no" frameborder="0" ></IFRAME></TD>
    											</TR>
    											<TR>

    Code:
    Private Sub Command5_Click()
    Dim doc As HTMLDocument
    Dim aHref As HTMLAnchorElement
    
    Set doc = WebBrowser2.Document
    
    For Each aHref In WebBrowser2.Document.All.tags("A")
    
    'MsgBox aHref.href
    If InStr(aHref.href, "player.php?mediaID=") Then
    List2.AddItem aHref.href
    End If
    Next aHref
    End Sub

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: how to get src=" " value from webbrowser controle source code ?

    DigiRev's example here might give you an idea of how to do what you're after
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #3
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: how to get src=" " value from webbrowser controle source code ?

    Max187Boucher's example here might give you an idea of how to do what you're after

    haha sorry NightWalker but i answered his question in his other post... which was kind of a duplicated post

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