Import table using IMPORTXML

点点圈 提交于 2021-01-29 10:59:23

问题


I am trying to pull the table from https://rotogrinders.com/schedules/nfl into Google Sheets

I tried using ImportHTML("https://rotogrinders.com/schedules/nfl", "table", 1) but it just returns the header:

Time Team Opponent Line Moneyline Over/Under Projected Points Projected Points Change

Using ImportXML, I tried IMportXML("https://rotogrinders.com/schedules/nfl","//tr"), but it returns the same header and no data.

I dont think the tbody needs authentication to access. I logged out, cleared my cache and even tried on another computer and still no tbody.

I know its a table called "tschedules", but cant get the data

Is there another part of the XPATH I am missing?

This is the XPATH from google scraper: "//table[1]/tbody/tr[td]"


回答1:


When you load this website the actual table doesn't load in for a few seconds. This is why you're not seeing any data come in. If you can set some wait time on that import call somehow then it would work.



来源:https://stackoverflow.com/questions/52505995/import-table-using-importxml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!