如何在我的桌面应用程序中嵌入Google搜索. [英] How to embed Google Search in my desktop application.

查看:104
本文介绍了如何在我的桌面应用程序中嵌入Google搜索.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要在桌面应用程序中嵌入Google搜索引擎.我需要在网上搜索.

问题是,我不想在应用程序中使用任何浏览器窗口.我想要的是与此类似的工作流程:
1)连接到Google服务器.
2)请求搜索.
3)以某种结构化格式获取搜索结果.
4)使用我自己的UI显示搜索结果.

那么,是否可以使用当前的Google API之一?
顺便说一句,我正在使用Qt作为框架(如果有帮助的话).

谢谢.

Hi,

I need to embed a Google search engine in my desktop application. I need to search in web.

The problem, that I don''t want any browser window in my application. What I want is workflow similar to this:
1) Connect to the google server.
2) Request for the search.
3) Get search results in some structured format.
4) Display search results using my own UI.

So, is it possible with one of the current Google APIs?
Btw, I''m using Qt as a framework (if it might help).

Thanks.

推荐答案

您可以在桌面应用程序中使用Google AJAX API,该API公开了原始的RESTful接口,该接口返回JSON编码的结果,大多数语言都可以轻松地对其进行处理.但是,您还需要考虑一些运行时的特殊注意事项(例如,userip参数,该参数标识进行查询的客户端的IP地址).您还希望确保详细检查TOS,以确保您的应用程序不会违反诸如禁止机器人,蜘蛛和其他进行自动查询的应用程序之类的条款.您可以找到一个相关资源的数量,包括下面链接中您可能正在考虑使用的各种语言的代码段.
服务条款: http://code.google.com/apis/ajaxsearch/terms.html [ ^ ]
说明文件:
http://code.google.com/apis/ajaxsearch/documentation/index.html#fonje [^ ]
http://code.google.com/apis/ajaxsearch/documentation/reference.html [ ^ ]
You can use the Google AJAX APIs in your desktop application, the API exposes a raw RESTful interface that returns JSON encoded results that are easily processed by most languages and run-times,however, a few special considerations that you want to take into account (e.g., the userip parameter which identifies the IP address of the client for which the query is being made). You also want to make sure to review the TOS in detail to make certain that your application won''t be in violation of clauses such as the prohibition of robots, spiders, and other applications which make automated queries, etc. You can find a number of relevant resources, including code snippets for various languages that you might be considering using, at the links below.
TOS: http://code.google.com/apis/ajaxsearch/terms.html[^]
Documentation:
http://code.google.com/apis/ajaxsearch/documentation/index.html#fonje[^]
http://code.google.com/apis/ajaxsearch/documentation/reference.html[^]


这篇关于如何在我的桌面应用程序中嵌入Google搜索.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆