1
First of all, yes, I have checked the Apis provided by Google, such as Google Web Search (discontinued) and the new Google Custom Search, which from what I’ve seen works only for searches within a specified site. What I want is to get only the first links of a particular search (across the web), preferably if it were possible to do this in Javascript. Is there a way without having to use Apis, something using for example the google.com/search link? q=test and get the results? Grateful.
All right. It can be said that by the back-end, I want to do a crawling of the obtained pages, but I want to get that page through the way I quoted in the question.
– Ablon
@Ablon I already managed to do a part. I’ll have to study a little more Regular Expression to help you in this, which in the end was an excellent doubt! I’ve already been able to find the Google creation pattern, now we need to extract the Urls and Title cohesively. As soon as you have the code I’ll put it here.
– Raul F. de Melo
Okay, thank you! But how do you get Google to search within the code to get the result Urls?
– Ablon
@Ablon, what I do is HTTP request the google URL
http://google.com/search
and pass the parameterq
with the search value, for example:http://google.com/search?q=maiores+cidades+do+mundo
.– Raul F. de Melo
all right, I’m waiting, thanks in advance!
– Ablon