Comment ajuster ce script Google News - en utilisant des variables, je suppose - pour placer l'année en cours et le mois en cours dans la recherche booléenne - en particulier, la ligne commençant par «tabulation». exécuter (...? »Ajustement du script Google News pour renvoyer le mois en cours
mon objectif final est d'avoir ce script retourne les termes de recherche dans le contexte de l'année en cours et par mois. Merci de nous aider un débutant!
google.load('search', '1');
function OnLoad() {
// create a tabbed mode search control
var tabbed = new google.search.SearchControl();
// create our searchers. There will now be 4 tabs.
tabbed.addSearcher(new google.search.VideoSearch());
tabbed.addSearcher(new google.search.NewsSearch());
tabbed.addSearcher(new google.search.BlogSearch());
tabbed.addSearcher(new google.search.ImageSearch());
// draw in tabbed layout mode
var drawOptions = new google.search.DrawOptions();
drawOptions.setDrawMode(google.search.SearchControl.DRAW_MODE_TABBED);
// Draw the tabbed view in the content div
tabbed.draw(document.getElementById("stephennews"), drawOptions);
// Search!
tabbed.execute("'SEARCHTERM1' AND 'SEARCHTERM2' AND '2013' AND 'MARCH'");
}
google.setOnLoadCallback(OnLoad);