xpath - 无法在 googlesheet 中找到要导入的正确 xpath
问题描述
我试图通过使用 importxml 来获取数据,但我很想获取我使用的数据 XPath 没有提供我想要获取的数据。但我可以使用 importhtm 和提表获得相同的数据,但我需要使用 importxml 来获得最佳匹配。
这是我使用检查元素工具获得的 XPath
/html/body/div[2]/div[1]/div[1]/table/tbody/tr[1]/td[2]/strong
这是CSS路径
div.container-fluid div.row-fluid div.span6 table.table.table-bordered tbody tr td strong
这是 CSS 选择器
div.span6:nth-child(1) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(2) > strong:nth-child(1)
我尝试过的
=ImportXML("https://siteurl com","//*[@class='span6']/table/tbody/tr[1]/td[2]/strong")
Got Error #N/A (Error
Imported content is empty.)
解决方案
推荐阅读
- batch-file - 如何删除 | 变量中的字符
- android - 在将一个输入查询拆分为两个查询后,dialogflow v2 detectIntent 中的无限循环
- reactjs - 子组件 redux 表单验证在 React JS 中不起作用
- php - 重定向到电子邮件用户站点
- c# - 如何在不同的线程中使用实体框架?
- c - 在C中对文本文件中的数据进行排序
- laravel - Laravel Eloquent 查询忽略列值
- ios - 添加多个参考节点时从 .sks 文件播放动画
- r - 如何将“应用”与返回错误尺寸 (R) 的函数一起使用
- c# - 如何从 FunctionApp 设置会话 ID 或在 ApplicationInsights 中创建自定义字段