6 points · by gbachik · 12y ago · 17 comments
You'll notice a box on the righthand side with more info about the band.
If you click the down arrow you'll see a "People also search for" section.
If you can scrape that data, in under 4 seconds(Sorry no PhantomJS), I'll pay you 500$ for your solution.
Under four seconds, please note that this violates Google's ToS and you will likely be blocked if you do this on any significant scale.
var bandname = "All Time Low";
var fetchUrl = require("fetch").fetchUrl;
var url = "https://www.google.de/search?q=";
bandname = bandname.replace(" ", "+");
fetchUrl(url+bandname, {
headers: {
'User-Agent' : 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36'
}
}, function(error, meta, body){
var ret = [];
var alts = body.toString().split('alt\\x3d\\x22');
alts.forEach(function (alt) { var cur = alt.split("\\x22")[0]; if (cur.indexOf("(")==-1) ret.push(cur) });
console.log(ret);
});Here is Google XML API http://suggestqueries.google.com/complete/search?output=tool...
I'm looking at a number of api's and doing algorithms on the results
-thanks though
http://webcache.googleusercontent.com/search?q=cache:LEbxw95...