Error en el comando !img de Google
robotrono opened this issue · comments
Bueno ahora resulta que al poner el comando para buscar una imagen en google nos muestra el siguiente error:
ERROR: Reached maximum searches per day
¿que se puede hacer?
The maximum search error is just a standard error message in case a 403 is returned by the API.
Checked the API via curl.
curl "http://ajax.googleapis.com/ajax/services/search/images?v=1.0&rsz=5&q=test"
{"responseData": null, "responseDetails": "This API is no longer available.", "responseStatus": 403}
Looks like Googles image search API is no more :-(
is there an alternative?
I have an example of my new img_google.lua file here: http://moaifiddle.com/36Q4GYJRR2/1
You can create a cx token following these rules: http://stackoverflow.com/a/34062567
You can create apikeys by adding server keys on: https://console.developers.google.com/apis/credentials (I created 5, because you can only do 100 requests per day per apikey)
It is important that your data/google.lua looks like this:
do local _ = {
cx = "12345678901234567890:qwertyuiop",
api_keys = {
"SOMEAPIKEY1",
"SOMEAPIKEY2",
"SOMEAPIKEY3",
"SOMEAPIKEY4",
"SOMEAPIKEY5"
}
}
return _
end
Is there a way to enable safesearch? safe=active does not work anymore.
I found this script for a decentralised, offline search engine:
https://github.com/asciimoo/searx/blob/master/searx/engines/qwant.py
For example
https://api.qwant.com/api/search/images?count=10&offset=1&f=&q=cars
It's not Google, but you can use that API to search for images and to my knowledge there isn't a limit on the API. It would require some tweaking though.
Is there a way to enable safesearch? safe=active does not work anymore.
The new parameters are: off, medium, high
kvanhoorn >> Image not found :(
@kvanhoorn
I receive the same message as Gusiky.
Image not found
@kvanhoorn Changed the setting (wasn't set) but still receive the same message
@lexzz can you print the url (without the apikey, but with cx token)
@kvanhoorn /basic?cx=014517009909333815812:oi6s3rfph1e
@kvanhoorn /basic?cx=011344415500081287727:o475mc2u9fg
message": "Access Not Configured. The API (CustomSearch API) is not enabled for your project. Please use the Google Developers Console to update your configuration.",
"extendedHelp": "https://console.developers.google.com"
Yeah! Everything is ok now thank you!
@Gurskiy Click on the url, go to "Enable APIs and get credentials like keys" and choose "Other popular APIs" -> "Custom Search API" and enable it.
@kvanhoorn Problem solved! Thank you!
Hmmm. Now i have
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceeded",
"message": "Daily Limit Exceeded"
}
],
"code": 403,
"message": "Daily Limit Exceeded"
}
}
on all my 10 api
Thank you @kvanhoorn
@kvanhoorn
I can not find where I can enable this
https://cloud.githubusercontent.com/assets/3934499/11587784/3a7706a4-9a7c-11e5-9983-2107953350f5.png
help
@drig0 Go to https://cse.google.com/cse/all, choose your custom search engine and toggle the first switch ("image search")
@Brawl345 thanks
then follow step by step, yet I find myself with the following message,
no images found
Can anyone modify plugin to use Duckduckgo api? (https://duckduckgo.com/api)
DDG doesn't have an image api
DDG doesn't have an image api
I'm not sure at all, but I would say that the same API can be used to search images, using the &ia=images
param.
My plugin alternative https://gist.github.com/TiagoDanin/b8506de4b6fe51170307