0

我想从搜索关键字的谷歌页面中抓取前 10 个搜索链接。

我正在使用网络收获。计划刮掉href链接并使用一些过滤掉前10名

属性模式?方法是否正确,目前不起作用。还有其他简单的方法吗?:(

4

2 回答 2

1

只使用此处描述的 google 搜索 REST API 怎么样。

于 2010-09-02T12:11:28.730 回答
0

使用 Google 表格更容易(即使您可以监控更改),但您可能有选择外部工具的理由。

一般来说,您需要 3 个函数来获得结果

extract Title "//h3[@class='r']"
extract  URL "//h3/a/@href"
clean URL "\/url\?q=(.+)&sa" - (All external URLs in Google Search results have tracking enabled and we’ll use Regular Expression to extract clean URLs)
于 2015-10-29T18:31:31.667 回答