Simple Live Timing Data Scraper…

A couple of weeks ago, I noticed an F1 live timing site with an easy to hit endpoint… here’s the Mac commandline script I used to grab the timing info, once every five seconds or so…

mkdir f1_silverstone
i=1; sleep 900; while true ; do curl http://www.livesportstreaming24.com/live.php >> f1_silverstone/f1output_race_${i}.txt ;i=$((i+1)); sleep 5 ; done

Now I just need to think what I’m going to do with the data! Maybe an opportunity to revisit this thing and try out some realtime dashboard widget toys?

PS to get the timestamp of each file in python:

import os
os.path.getctime(filename)

Author: Tony Hirst

I'm a Senior Lecturer at The Open University, with an interest in #opendata policy and practice, as well as general web tinkering...

%d bloggers like this: