Google表格中的importxml函数不适用于特定网站 [英] importxml function in google sheets not working for specific website

查看:44
本文介绍了Google表格中的importxml函数不适用于特定网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Google表格中的importxml函数为特定类型的证券(称为结构化票据)导入价格.许多银行都提供这些产品,并且已经在大多数不同的银行网站上使用.我正在做的是突出显示价格,单击检查,然后右键单击特定行并选择copy-> xpath.然后在Google工作表中,我将链接插入一个单元格,称为A1,然后将xpath插入B1.然后在C1中,我正在执行= importxml(A1,B1).就像我说的那样,它适用于大多数其他银行网站.但是由于某种原因,它不适用于TD.任何帮助将不胜感激.我正在寻找每张纸的收盘价.当前该值为134.18.这是链接: https://www.tdstructurednotes.com/snp/noteDetails.action?noteId = 1471 谢谢!

I'm trying to use importxml function in google sheets to import a price for a specific kind of security which is called a structured note. Many banks offer these products and it has been working for most of the different bank websites. What I'm doing is highlighting the price, clicking inspect, then right clicking on the specific line and choosing copy->xpath. Then in google sheets I insert the link into one cell, call it A1, and I insert the xpath into B1. Then in C1 I am doing =importxml(A1,B1). Like I said it works for most other bank websites. But for some reason it's just not working with TD. Any help would be greatly appreciated. I am looking for the closing bid price per note. Currently that value is 134.18. Here is the link: https://www.tdstructurednotes.com/snp/noteDetails.action?noteId=1471 Thanks!

推荐答案

您要导入的网站()由JavaScript控制.因此,来自Google工作表的import()函数将无法为您获取数据.您可能一开始可能不会注意到它,但是当它进入我同意"网页时,当您将JavaScript设置为阻止"时,这些按钮将无法点击(点击地址栏旁边的锁定图标->转到网站设置->在这种情况下,将JavaScript设置为阻止"并使用隐身模式重新加载网站).

The website you are trying to import() is controlled by JavaScript. Thus, import() functions from google sheets won't be able to fetch the data for you. You may not be able to notice it at first but when landed on the 'I Agree' webpage, the buttons will not be clickable when you turn JavaScript to 'Block'(Click lock icon beside address bar->Go to site settings->Set JavaScript to 'Block' and reload website using incognito for this case) for that website.

我建议寻找另一个提供相同数据的数据源.

I suggest finding another source of data that gives the same data.

这篇关于Google表格中的importxml函数不适用于特定网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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