我正在使用谷歌图片搜索API.直到昨天它正在运行,但今天早上它说"此API不再可用"
是正式关闭,还是我身边的任何错误
请求
https://ajax.googleapis.com/ajax/services/search/images?v=1.0&rsz=8&q=cute+kittens
响应
{"responseData": null, "responseDetails": "This API is no longer available.", "responseStatus": 403}
Run Code Online (Sandbox Code Playgroud) 对于我的工作,我正在研究一个人们会使用谷歌搜索图像并使用他们找到的任何名人照片的想法.谷歌将返回结果,然后在我们的最后,有一个专业人士数据库显示如何获得特定的外观.
我假设这是不太可能的,基于用户可以使用任何照片.
那么,有没有一种方法可以让我有大约100张左右的名人照片,谷歌图像结果可以比较,然后选择最接近的那些.
基本上:
我不是程序员,但是正在寻找一些API或Search by Image扩展,这可以让我的工作中的程序员远程实现这一点.是否存在类似的东西(图像api搜索)?我能找到的最好的只是支持页面,几乎没有任何帮助:http://support.google.com/images/bin/answer.py?hl = zh-CN&p = searchbyimagepage&answer = 132258
我正在管理照片共享网站,作为管理员,我想要一个按钮来检查上传照片的来源(为了侵犯版权).
我的想法是简单地启动Google反向图片搜索服务的网址,将我的图片网址作为网址中的参数传递.我不需要自动后端集成,我只需单击该按钮查看可疑图像,并手动和直观地检查结果.
由于不推荐使用Google Image Search API,我正在尝试弄清楚这些反向网址是如何编码的.这是一个例子:
我认为SBI参数是URL的编码版本.有谁知道这是什么样的编码?
Since Google image search API is deprecated, one should use Google custom search API for this.
I've made a small example using it. My problem is I want to return google image search results only. Whereby this shows web results, and the user may switch to the image result. How can I show only the image results by default?
<div id="cse" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'hu'});
google.setOnLoadCallback(function() {
var customSearchOptions = { …
Run Code Online (Sandbox Code Playgroud) 我正在尝试将回调函数从控制器传递给指令.
这是回调函数代码:
$scope.onImageSelect = function(image) {
alert('SET');
$scope.card.image = image;
};
Run Code Online (Sandbox Code Playgroud)
指令用法:
<google-image-search callback="onImageSelect" />
Run Code Online (Sandbox Code Playgroud)
指令代码:
ngmod.directive('directive', function() {
return {
templateUrl: '/templates/template.html',
scope: {
callback: '&'
}
}
});
Run Code Online (Sandbox Code Playgroud)
模板中的回调用法:
<a data-ng-click="callback(url)"></a>
Run Code Online (Sandbox Code Playgroud)
但是,这给了我以下错误:
TypeError: Cannot use 'in' operator to search for 'onImageSelect'
Run Code Online (Sandbox Code Playgroud)
我见过很多类似的问题,但无法理解我错在哪里.
javascript google-image-search angularjs angularjs-directive angularjs-ng-click
代码帮助我从谷歌下载了一堆图片。几天前它曾经可以工作,现在突然代码中断了。
代码 :
# importing google_images_download module
from google_images_download import google_images_download
# creating object
response = google_images_download.googleimagesdownload()
search_queries = ['Apple', 'Orange', 'Grapes', 'water melon']
def downloadimages(query):
# keywords is the search query
# format is the image file format
# limit is the number of images to be downloaded
# print urs is to print the image file url
# size is the image size which can
# be specified manually ("large, medium, icon")
# aspect ratio denotes the height …
Run Code Online (Sandbox Code Playgroud) 我正在寻找批处理或Powershell脚本,以使用本地图像作为输入在Google图像上搜索类似的图像.
我的研究到目前为止
使用URL而不是本地文件进行图像搜索的语法如下:
https://www.google.com/searchbyimage?image_url=TEST
其中TEST可以替换为您拥有的任何图像URL.
我使用cURL for windows和imgur作为临时图像保护程序.我能够通过批量上传文件到imgur.然后使用图片网址在Google上搜索类似的图片.
但我想知道是否可以不使用像imgur或任何其他在线图片服务的任何临时缓存.只是批量,卷曲,谷歌和我.
只是一个想法.VBS脚本是否能够使用本地文件作为输入在Google图像上进行搜索?
或者像Tineye这样的类似Web服务更适合这项任务?
此PowerShell代码段将打开谷歌图像搜索.
$IE= new-object -com InternetExplorer.Application
$IE.navigate2("https://www.google.com/imghp?hl=en")
while ($IE.busy) {
sleep -milliseconds 50
}
$IE.visible=$true
Run Code Online (Sandbox Code Playgroud)
接下来的步骤是获取某些按钮的ID并以编程方式单击它们以选择本地文件.但在这里,我没有足够的经验来实现这一目标.
我正在使用google_images_download
库下载关键字的前 20 个图像。当我最后几天使用它时,它工作得很好。代码如下。
from google_images_download import google_images_download
response = google_images_download.googleimagesdownload()
arguments = {"keywords":keyword,"limit":10,"print_urls":True}
paths = response.download(arguments)
Run Code Online (Sandbox Code Playgroud)
现在它给出了以下错误。
Evaluating...
Starting Download...
Unfortunately all 10 could not be downloaded because some images were not downloadable. 0 is all we got for this search filter!
Errors: 0
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个错误。
如何通过java编程将图像转换为"某些字符串"以将其作为参数传递给谷歌图像搜索.实际上我做了一些base64转换的图像,但它不同于谷歌在其图像搜索引擎中做的.我做了这样的转换(java 7):
import javax.xml.bind.DatatypeConverter;
...
Path p = Paths.get("my_photo.JPG");
try(InputStream in = Files.newInputStream(p);
PrintWriter write = new PrintWriter("base64.txt");
) {
byte [] bytes = new byte[in.available()];
in.read(bytes);
String base64 = DatatypeConverter.printBase64Binary(bytes);
write.println(base64);
} catch(IOException ex) {
ex.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
这个简单程序的输出与url中google的字符串不同.我谈到了之后的那个字符串tbs=sbi:AMhZZ...
javascript ×2
python ×2
angularjs ×1
batch-file ×1
colors ×1
curl ×1
google-api ×1
image ×1
java ×1
powershell ×1
python-3.x ×1