我想通过谷歌搜索将所有网址添加到数组或txt中。这是我的代码,它允许我使用谷歌搜索API进行搜索。
var ss = document.getElementById("searchBox").value;
var searchControl = new google.search.SearchControl();
// Add in a full set of searchers
/*var localSearch = new google.search.LocalSearch();
searchControl.addSearcher(localSearch);*/
searchControl.addSearcher(new google.search.WebSearch());
// create a drawOptions object
var drawOptions = new google.search.DrawOptions();
// tell the searcher to draw itself and tell it where to attach
searchControl.draw(document.getElementById("searchcontrol"), drawOptions);
// execute an inital search
searchControl.execute(ss);
}