VB.net从Google搜索中提取结果

时间:2012-10-30 09:30:03

标签: vb.net google-api google-search google-search-api

我想提取谷歌搜索结果,
我正在使用Google.API.Search

我尝试通过此代码提取结果:

Dim client As New GwebSearchClient("http://www.google.co.il")
Dim results As IList(Of IWebResult) = client.Search("test", 64)
For Each result As IWebResult In results
            ListBox1.Items.Add(result.Url)
Next
Me.Text = ListBox1.Items.Count

此代码可以部分
结果仅限于 64 结果。
我想获得400个结果,
还有另一种方法可以从谷歌获得结果吗?
(我不喜欢使用Google.API.Search,也许可以通过“正则表达式”得到结果) 我会喜欢任何其他方式。

2 个答案:

答案 0 :(得分:0)

我不确定这是怎么回事。但是字符串“test”旁边有一个等于64的整数。你得到了64个结果,所以我猜可能就是这样。

Dim client As New GwebSearchClient("http://www.google.co.il")
Dim results As IList(Of IWebResult) = client.Search("test", 400)
For Each result As IWebResult In results
            ListBox1.Items.Add(result.Url)
Next
Me.Text = ListBox1.Items.Count

将代码改为上面,应该没问题!

答案 1 :(得分:0)

遗憾的是,无论您将限制设置为超过限制,Google搜索API都会将搜索范围限制为64。至少这是我在他们的文档中读到的..

相关问题