xml - Google Sheets ImportXML 的 XPath 查询以获取 YouTube 视频 URL 并从页面订阅计数
问题描述
我正在尝试导入 YouTube 订阅计数和频道 URL,但它不起作用。
我可以通过这个 https://prnt.sc/rjcw27导入视频视图//*[contains (@class, 'view-count')]
但是,当尝试从 YT 视频中获取频道 URL 时,它不起作用。https://prnt.sc/rjcvbm =+importxml(" https://www.youtube.com/watch?v=sLuR-4YxEns ","//*[包含 (@class, 'yt-simple-endpoint 样式-scope yt-formatted-string')]")
这也是我尝试过的:
=//yt-formatted-string[@id='text']/a/@href
="//*[contains (@class, 'style-scope ytd-c4-tabbed-header-renderer')]"
=//*[contains (@class, 'yt-simple-endpoint style-scope yt-formatted-string')]"
=//*[@id="subscriber-count"]
有人可以帮忙吗?
解决方案
推荐阅读
- java - 表达式不能反转,因此不能用于双向绑定
- angular - 将值传递给组件时的 ExpressionChangedAfterItHasBeenCheckedError
- java - 以编程方式创建的 Feign 客户端和 Eureka 目标
- ios - 从 JSON 响应中创建一个数组
- python - Python BeautifulSoup 为元素返回空文本,浏览器显示文本,源代码不显示任何内容
- java - 当我想单击按钮时如何创建 Enter 事件,而不使用类 Robot?
- python - 如何显示
? - php - file_put_contents(C:\Users\FNRI\Desktop):无法打开流:没有这样的文件或目录
- c - 函数不能返回returnSize数组中的元素的问题
- python - 错误:“无法使用无作为查询值”尝试在 Django 中使用 ListView 分页时