1
Based on this code:
function baixarCapa(capa, item) {
$.getJSON("https://ajax.googleapis.com/ajax/services/search/images?callback=?", {
q: '"' + capa + '"',
v: '1.0'
}, function(data) {
var url = data.responseData.results[0].url;
$('[data-capa=' + item + ']').html('<img src="' + url + '">');
});
}
I can download artist images using the Google Images API, but the results are wrong in 50% of cases and are different from when I access the Google site and search by the same term.
Behaviour of $.getJSON http://img.somdomato.com/imagens/top10.jpg
Why does this happen? How can I correct this behavior? Thank you.
When YOU search, there is caching in your browser or even you are logged in to your google account, where there are preference mechanisms that will know for sure what you want. Try opening an anonymous tab and doing the search.
– Luis Henrique
Yes, even with the anonymous tab the first result is completely different, and correct.
– sistematico
Just a question, how are you passing the value pro parameter
capa
?– Renan Gomes
You nailed it, I was seeking Artist - Music when the correct was only Artist!
– sistematico