Date: 01/25/08 (C Sharp) Keywords: html, web, google I'm working on an IRC bot in C# and I want to be able to have a command that will take a query, search Google with it, then display the first few results in the order of PAGE TITLE, URL, SHORT DESCRIPTION. Right now the best I've been able to do is download the first page of results which really doesn't help me any. try { using (WebClient wc = new WebClient()) { wc.Proxy = null; wc.QueryString.Add("q", query); wc.DownloadFile("http://www.google.com/search", "results.html"); } } catch (Exception e) { System.Console.WriteLine("Error: " + e.ToString()); } Is what I need to do even possible? If it is, all I really need help with is to get the three components of the results (maybe for the first two just to start) to be passed back to the method that calls this one. Any help is severely appreciated.
|