【问题标题】:Error on importxml function in Google Spreadsheet while scraping Google抓取 Google 时 Google 电子表格中的 importxml 函数出错
【发布时间】:2017-01-06 05:12:41
【问题描述】:

我正在尝试使用以下函数将一些 Google 搜索结果抓取到我的 Google 电子表格中:

=importxml("https://www.google.pl/search?q=Arsenal";"//title")

我一直面临错误:“无法获取 URL”。

我尝试使用不同的 Google 搜索结果页面、不同的 HTML 标记

【问题讨论】:

    标签: xml google-sheets


    【解决方案1】:

    Google 不希望他们的搜索页面被抓取。特别是,它不会让您使用他们自己的表格功能来抓取它们。

    要从表格访问 Google 搜索结果,您需要使用他们的搜索 API 编写一个 Apps 脚本。一个例子是here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-10-17
      • 2012-12-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多