How do I grab particular google results with vb.net? to listbox
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: How do I grab particular google results with vb.net? to listbox

Hybrid View

  1. #1
    Join Date
    Dec 2012
    Posts
    2

    Question How do I grab particular google results with vb.net? to listbox

    I know howto make the vb program go to Google, even navigate around but I don't know how to manipulate the results.
    Basically what I want the program to grab search results from Google and retrieve links specified by the user for instance if the user searches for Burgers and they only want results from Burgerking.com. Then only those would be output to the listbox. Does anyone know how to do this? here's my code so far:
    Public Class Form1

    Dim look, retrieve As String

    Private Sub Search_Click(sender As Object, e As EventArgs) Handles Search.Click
    look = InputBox("What are you looking for?")
    look = look.Replace(" ", "+")
    Dim G1 As String = "http://www.google.co.uk/#hl=en&tbo=d&output=search&sclient=psy-ab&q="
    WebBrowser1.Navigate(G1 + look)

    retrieve = InputBox("What links do you want to retrieve?")

    End Sub

    End Class

  2. #2
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,982

    Re: How do I grab particular google results with vb.net? to listbox

    Include site:Burgerking.com

    to the query!
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Dec 2012
    Posts
    2

    Re: How do I grab particular google results with vb.net? to listbox

    Whats the quickest way to transfer results from Google to listbox now then :-)


    ----------------------
    I know it is easier to use the google api. But it is also a lot slower, i've used it in the past. I've just seen in another thread howto download a website's source and pretty quickly just don't know how to grab the urls from the downloaded source. Is anyone here any good with string manipulation?

    Code so far:
    sourcecode = ((New Net.WebClient).DownloadString(G1 + look))
    Last edited by ourguys; December 17th, 2012 at 10:10 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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center