Open renandecarlo opened 4 years ago
We could use duckduckgo, bing and others providers in order to avoid Google's limitations.
Bing and Yahoo also do have limits, duckduckgo would definitely be a better alternative than proxies though, if it allows crawling.
DuckDuckGo has an official API and it seems to have a more abroad limitation. It does not implicitly say how much is it though. It's very straight forward, you just access the api url: https://api.duckduckgo.com/?q=DuckDuckGo&format=json&pretty=1
Though, doing it like so doesn't include the visual feedback, which is needed (or not) for the Messenger response. We could, either (1) try scraping the ddg website directly and see if it have any limits; (2) use the official API and create a temporary local html to show the results, and get the imagem from it; or (3) return the results in text to the user
I think that the third option is better, because following this way the user doesn't need to download an image on the cellphone (that could be bad on 2G internet, for example).
probably we could be inspired by some CLI work on this field:
@vitordino these projects use the user IP addresses, so there shouldn't be any limitations. This one, however, needs to do every request from a server, so the limits apply
The SERP npm module provides an easy way to use proxies when getting the results. This can probably be used together with a proxy API to avoid Google limitations.