Google表格ImportHTML找不到表格? [英] Google Sheets ImportHTML can't find table?

查看:55
本文介绍了Google表格ImportHTML找不到表格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我之前已经使用过ImportHTML多次,但从未真正遇到过任何问题,但是由于某些原因,即使我从Basketball-Reference中拉出了其他表格,我似乎也无法从中拉出特定表格.那里很好.我想要的表是此页面下方的杂项统计"表.我已经尝试过该函数中从1到30的每个索引,但是超过7的它们都没有引入任何数据.我正在使用的功能如下,其中1更改为我正在尝试的任何索引:

I've used ImportHTML plenty of times before and never really had any issues with it, but for some reason, I can't seem to pull a particular table from Basketball-Reference, even though I've pulled other tables from there just fine. The table I want is the Miscellaneous Stats table lower down on this page. I've tried every index from 1 to 30 in the function, but none of them past 7 bring in any data. The function I'm using is below, with the 1 changing to whatever index I'm trying:

=IMPORTHTML("https://www.basketball-reference.com/leagues/NBA_2019.html", "table", 1)

我尝试在Chrome的控制台中使用以下代码来查找页面的索引,但是它没有返回任何内容:

I tried using the following code in Chrome's console to find the index of the page, but it didn't return anything:

var i = 1; [].forEach.call(document.getElementsByTagName("table"), function(x) { console.log(i++, x); });

有人知道如何使该表与ImportHTML一起使用吗?

Does anyone know how I can get this table working with ImportHTML?

推荐答案

好,player0关于无法抓取JS表是正确的,但是幸运的是我能够使用

Well, player0 was correct about being unable to scrape the JS table, but luckily I was able to use the URL for the embed version of that table, which works perfectly with ImportHTML.

这篇关于Google表格ImportHTML找不到表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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