Total noob here! I'm attempting to scrape live timing from the websites used by kart tracks to display race results. At this point, I'd like to grab the data in the table every 10 to 15 seconds and dump it to an CSV file that I will eventually analyze in Excel.
I've been able to grab PDFs of the page using FakeApp for Mac, but extracting the data I want from the PDFs is challenging. I've poked around using AppleScript, but I don't know how to access the data I want from the page.
My questions:
What JavaScript commands should I investigate using to capture the data?
Is JS the best tool to complete this task? If not, what other tool would be easier?
What terms should I use to search this site for help on this task?
Samples of the sites I'm trying to scrape:
Here is what I have tried thus far with no results.
tell application "Safari"
activate
open location "http://vlcharlotte.clubspeedtiming.com/sp_center/livescore.aspx"
delay 3
tell current tab of window 1
do JavaScript "dr1 = document.selectNodes('//div[3]/table/tbody/tr[1]/td[3]').value;"
-- do JavaScript "dr2 = document.selectNodes('//div[3]/table/tbody/tr[2]/td');"
-- do JavaScript "dr3 = document.selectNodes('//div[3]/table/tbody/tr[3]/td');"
do JavaScript "alert(dr1);"
end tell
end tell