Google Site Search no devuelve resultados
Frecuentes
Visto 74 veces
0
This code was working about 2 months ago. I understand it is deprecated, but it was working fine a few months ago like early October(2013). Did Google change their API again?
google.load('search', '1');
function OnLoad() {
// Create a search control
var searchControl = new google.search.SearchControl();
// Add in a WebSearch
var webSearch = new google.search.WebSearch();
// Restrict our search to pages from the Cartoon Newtowrk
webSearch.setSiteRestriction('stmikes.utoronto.ca');
// Add the searcher to the SearchControl
searchControl.addSearcher(webSearch);
// tell the searcher to draw itself and tell it where to attach
searchControl.draw(document.getElementById("content"));
// execute an inital search
searchControl.execute('SMC');
}
google.setOnLoadCallback(OnLoad);
HTML
<div id="content">Loading...</div>
1 Respuestas
0
Es deprecated and rate-limited. You should use Google Custom Search instead.
Respondido el 30 de diciembre de 13 a las 21:12
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas google-search google-sites google-search-api or haz tu propia pregunta.