Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2010 > Visual Basic 2010 General Discussion
Visual Basic 2010 General Discussion For any discussions about Visual Basic 2010 topics which aren't related to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2010 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 16th, 2012, 08:24 PM
Registered User
Join Date: Dec 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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
Old December 17th, 2012, 12:11 PM
Registered User
Join Date: Dec 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

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))
Old March 3rd, 2013, 09:53 PM
Friend of Wrox
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts


I also agree that Google API would be the best way. You can also use Microsoft Internet Controls and decipher the code. I have used the same and was able to accomplish to great extent.


Please have a try and let us know if you need any any help

C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending VBA generated email via Google Mail (Google apps) Nyanko Excel VBA 2 February 9th, 2013 10:44 AM
ASP.NET Menu & Google Chrome barakros BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 May 13th, 2010 05:45 PM
Getting google to index asp.net site scottlucas58 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 February 9th, 2010 12:25 AM
Listbox Values using VB.net remya1000 .NET Framework 1.x 1 February 15th, 2008 10:49 AM
Grab a Section of a Sound File w/.NET BrianWren Pro VB.NET 2002/2003 0 January 3rd, 2008 04:23 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.