Results 1 to 3 of 3

Thread: vb6 webbrowser outerhtml parse all document incoming

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2015
    Posts
    102

    vb6 webbrowser outerhtml parse all document incoming

    ok
    Code:
    Private Sub Web1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
    Dim data As String, cite As String
    data = Web1.Document.documentElement.outerhtml
    ArrayOfLines = Split(data, "<DIV class=_nBb>?")
    Dim X As Integer
    For X = 0 To UBound(ArrayOfLines)
    cite = Split(ArrayOfLines(X), "<CITE>")(1)
    cite = Split(cite, "</CITE>")(0)
    List1.AddItem cite
    Next
    End Sub
    im all screwed up here is the data which each site is setup
    <DIV class=s>
    <DIV style="MARGIN-BOTTOM: 2px" class=kv><CITE>sockslist.net/check?i=<B>67.198.141.98:60088</B></CITE>
    <DIV class=_nBb>?

    <DIV class=s>
    <DIV style="MARGIN-BOTTOM: 2px" class=kv><CITE>sockslist.net/check?i=<B>67.198.141.98:60088</B></CITE>
    <DIV class=_nBb>?

    and so on i need it to array the whole data and add it to list1 im parseing a google search result to pull the sites only
    Last edited by newbiedoobie1983; Apr 17th, 2015 at 06:47 PM.

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,963

    Re: vb6 webbrowser outerhtml parse all document incoming

    so what exactly is the question?
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Posts
    21,427

    Re: vb6 webbrowser outerhtml parse all document incoming

    Google does not allow web scraping, and their terms of service contain statements like:

    Don’t misuse our Services. For example, don’t interfere with our Services or try to access them using a method other than the interface and the instructions that we provide. You may use our Services only as permitted by law, including applicable export and re-export control laws and regulations. We may suspend or stop providing our Services to you if you do not comply with our terms or policies or if we are investigating suspected misconduct.
    If they detect what apears to be webscraping you can get an entire subnet of IP addresses blacklisted for several days. And yes, it happens.

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