任何人都可以帮助我在C#中获取Google的定义和数据 [英] Can anyone help me in Getting definations and Data from Google in C#

查看:75
本文介绍了任何人都可以帮助我在C#中获取Google的定义和数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在尝试在C#中创建一个程序,该程序将返回数据(谷歌显示的定义),例如

https://drive.google。 com / file / d / 0ByKNXX5k0y0vcXVUYjZ3RGhST28 / view?usp = sharing

你可以看到这个链接以更好地理解我的要求。

我目前正在使用谷歌网络搜索API给我数据列表

 WebQuery query =  new  WebQuery(搜索); 
query.StartIndex.Value = 0 ;
query.HostLangauge.Value = Languages.English;

IGoogleResultSet< GoogleWebResult> resultSet = GoogleService.Instance.Search< GoogleWebResult>(查询);

return resultSet.Results [ 0 ]。Content.ToString();



这会返回搜索结果列表。我需要的是通过谷歌获得确切的定义,它在搜索任何单词含义或某些定义甚至时间时首先出现。



有没有办法做到这一点?

感谢您的帮助

解决方案

您可以根据需要进行筛选和排序。查看文档 - https://developers.google.com/custom-search/docs/structured_search? hl = en [ ^ ]。

Hello,
I am trying to create a program in C# which will return Data (Definitions shown by google) for example
https://drive.google.com/file/d/0ByKNXX5k0y0vcXVUYjZ3RGhST28/view?usp=sharing
you Can see this link to better understand my requirement.
I am presently using a Google web search api which gives me list of data

WebQuery query = new WebQuery(search);
             query.StartIndex.Value = 0;
             query.HostLangauge.Value = Languages.English;
           
             IGoogleResultSet<GoogleWebResult> resultSet = GoogleService.Instance.Search<GoogleWebResult>(query);
           
             return resultSet.Results[0].Content.ToString();


this returns a list of search result. What I need is to get the exact definition by google which appears first while searching any Word Meaning or some Definition or even Time.

Is there a Way to do that?
Thanks for the help

解决方案

You can filter and sort as required. Check the documentation - https://developers.google.com/custom-search/docs/structured_search?hl=en[^].


这篇关于任何人都可以帮助我在C#中获取Google的定义和数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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