0

I am trying to import this table into a Google Spreadsheet: League Fixtures and Results The table is available here: https://competitions.lta.org.uk/sport/drawsheet.aspx?id=8D598CDE-8579-4541-B7AD-48558BF6FEA3&draw=4

Before Google changed their Spreadsheet addresses, I had the import working with ImportHTML(URL, "table", 2) - but this no longer works, even though there appears to be only two 'table' labels in the page HTML.

Looking for a way to abstract the table, I went to 'importXML' but tried several versions like 'importxml("https://competitions.lta.org.uk/sport/drawsheet.aspx?id=8D598CDE-8579-4541-B7AD-48558BF6FEA3&draw=4", "//div[contains(@id,'poule')]")' and the same first part of the statement with "//table[contains(@class,'ruler')]") but the formula fails with 'no content'

Would really appreciate some help to find a way to import this table! Thanks in anticipation,

Allan Thompson
  • 131
  • 1
  • 6
  • Maybe the table content itself is loaded dynamically. I this solve it? https://stackoverflow.com/questions/60332303/error-imported-content-is-empty-in-importhtml-function-in-google-sheet – AziMez Jan 30 '22 at 22:35
  • Looking at the source code for the page, there is no suggestion of javascript code calling the data. – Allan Thompson Feb 02 '22 at 02:13
  • Went through the steps here :- https://webapps.stackexchange.com/questions/115664/how-to-know-if-google-sheets-importdata-importfeed-importhtml-or-importxml-fun and Javascript is not a factor. – Allan Thompson Feb 02 '22 at 03:05

1 Answers1

0

The reason you can't get the table data is because of the cookies page

enter image description here

Every time Google Sheets is trying to access that link, you need to accept cookies, and by default, Google Sheets won't do it.

You need to bypass or accept the cookies from the website to access data, you will need to implement more advanced things in Python or Google Apps Script

David Salomon
  • 804
  • 1
  • 7
  • 24
  • David, Thank you so much for responding. I had not considered this possibility at all! I need to do more research. Strange thing is, I am sure the 'Accept Cookie' notice was present when the importHTML code was working.... regards, Allan – Allan Thompson Feb 02 '22 at 01:19