为什么 importxml 和 importhtml 在这里不起作用? [英] Why importxml and importhtml not working here?

查看:17
本文介绍了为什么 importxml 和 importhtml 在这里不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

=Importhtml("https://app.neilpatel.com/en/ubersuggest/keyword_ideas?keyword=Food%20Chart&locId=2840&lang=en", "table", 3)

<小时>

=ImportXML("https://app.neilpatel.com/en/ubersuggest/keyword_ideas?keyword=Food%20Chart&locId=2840&lang=en","//div[@class='css-19jz7zx']")

我使用上述公式在我的 google 表格中获取关键字.但我只得到 #N/A

I use the above formula to get keywords in my google sheet. but I only get #N/A

(错误导入的内容为空)

(Error Imported content is empty)

我无法理解我的公式有什么问题,为什么我无法获取数据.请帮我解决这个问题.

I'm unable to understand what is wrong with my formula, why I'm unable to get data. please help me with this.

推荐答案

我认为您的问题是由于您需要启用 JavaScript 才能运行此应用程序.值是使用 IMPORTXML 和 Google Apps 脚本从 URL 中检索的.

I think that the reason of your issue is due to You need to enable JavaScript to run this app. which are shown when the value is retrieved from the URL with IMPORTXML and Google Apps Script.

例如通过//body的xpath检索到网站时,只返回You need to enable JavaScript to run this app.的值.

For example, when the site is retrieved by the xpath of //body, only the value of You need to enable JavaScript to run this app. is returned.

很遗憾,Spreadsheet 的内置函数无法运行 Javascript.这样,就会发生这样的错误.在这种情况下,即使使用 Google Apps 脚本,也无法直接从 URL 中检索值.

Unfortunately, the built-in functions of Spreadsheet cannot be run the Javascript. By this, such error occurs. In this case, even when Google Apps Script was used, the values cannot be directly retrieved from the URL.

这篇关于为什么 importxml 和 importhtml 在这里不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆