1
votes

I'm trying to fetch the data off this site from the table "Team Per 100 Poss Stats."

I'm using this :

Formula:= ImportXml(A1, "//*[@id='div_team-stats-per_poss']")

But I keep getting an error telling me the content is empty. How do I refer to that specific table? I checked the source code and the data is there.

https://www.basketball-reference.com/leagues/NBA_2021.html

1

1 Answers

3
votes

try:

=ARRAYFORMULA(SPLIT(REGEXREPLACE(QUERY(
 ARRAY_CONSTRAIN(IMPORTDATA(A1), 1300, 1), 
 "limit 30 offset 1159", 0), 
 "</?\S+[^<>]*>", "×"), "××"))

enter image description here