Post by bobowk on Mar 27, 2017 7:30:04 GMT 10
Hey guys, How would I implement a Google Suggestion? I can't seem to find the answer anywhere so any help is great Thanks, Brandon
|
|
Post by Nathan Lecompte on Mar 27, 2017 9:32:24 GMT 10
You'd have to use the CSE (Google Custom Search Engine) API for that, I can't quite remember what the URL to fetch the suggestions was but I think they might have changed it. This is all the documentation by Google on it I could find: support.google.com/customsearch/answer/2631081?hl=en
|
|
Post by zealot on Mar 27, 2017 11:08:30 GMT 10
This is a question I always been thinking of. I know CefSharp has it because it is the engine for Chromium and has search suggestions are in Chromium.
|
|
Post by altair on Mar 29, 2017 1:49:49 GMT 10
This is a question I always been thinking of. I know CefSharp has it because it is the engine for Chromium and has search suggestions are in Chromium. CefSharp is not the one that shows the search suggestions... CefSharp is only used to render webpages and do javascript and stuff.. The search suggestions are implemented separately... I am working on a small library to do this... Will post in like an hour.... EDIT : Done : www.techviewforum.com/thread/571/gcomplete-simple-google-suggestions-retriever
|
|
Post by bobowk on Mar 29, 2017 19:00:17 GMT 10
Hey guys ( altair Nathan Lecompte zealot) I figured out a sorta working code, but it's slow as!!! Here it is: Uri url = new Uri("http://suggestqueries.google.com/complete/search?output=firefox&q=" + urlTextBox.Text); var request = (HttpWebRequest)WebRequest.Create(url);
var response = (HttpWebResponse)request.GetResponse();
var responseText = (new StreamReader(response.GetResponseStream())).ReadToEnd();
var items = (from each in responseText.Split(',') select each.Trim()).ToArray<string>(); Also, the ListItems have "" and [ around them. Eg: ["google.com "google youtube" "google dog" "google blah"
|
|