【问题标题】:Scraping number of likes and comments from an Instagram post via Google Sheet IMPORTXML通过 Google Sheet IMPORTXML 从 Instagram 帖子中获取喜欢和评论的数量
【发布时间】:2017-09-18 12:46:13
【问题描述】:

我是 importXML 的菜鸟。点赞数的 XPath 是

//*[@id="react-root"]/section/main/div/div/article/div[2]/section[2]/div/a/span

所以从这篇文章中刮取点赞数的公式:https://www.instagram.com/p/BZLli5ll6yz/ 应该是:

=IMPORTXML("https://www.instagram.com/p/BZLli5ll6yz/", "//*[@id="react-root"]/section/main/div/div/article/div[2]/section[2]/div/a/span")

对吗?我错过了什么?

【问题讨论】:

    标签: xpath google-sheets scrape


    【解决方案1】:

    确保在 xpath 中“react-root”在一个子类中:“react-root”。这使它包含在第二个参数中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-05-06
      • 1970-01-01
      • 2019-09-01
      • 2013-05-25
      • 1970-01-01
      • 1970-01-01
      • 2019-02-28
      相关资源
      最近更新 更多