Time table extraction

Hi

I need to extract data from a timetable in a website. In VBA i would simply set a variable to the ID of the table and then scan each row and extract the data.

Using the
UI elements of groups of UI elements of scroll areas of groups of window 1 of application process “Safari”
way is very cumbersome and the rows do not all have the same number of cells.

I’m sure there is a simpler way.

This:

tell application “Safari”
set Roster to do JavaScript “document.getelementsbyid(‘_tabRoster’)” in document 1
– _tabRoster is the ID of the table containing the data
end tell

does not return anything. I get ‘The variable Roster is not defined’

Any ideas?

Thanks