I race little toy cars for plastic trophies!
In all, i've got 6 RC cars. Not just your average kmart, warehouse, wallmart put some AA batteries in and watch them crawl along at a top speed of "walking pace", no way.
My 1/10th on-road car will do at least 60km/h (38mph) down our back straight, and it's 1/8th big brother will do something like 80-85km/h (50mph-ish). Some of our club members have cars, on our 85m back straight, will top 109km/h... impressive right!
Our results are collected via a transponder system from mylaps, everytime our cars passes over a wire, the transponder communicates with the timing computer and it logs its lap.
Now this is where my problem started....
The results were hard to read on the website. All the data was there but it was hard to compare your first qualifying round to the second and then to your finals, because they showed on different pages. Therefor you needed lots of tabs open if you didn't want to go back and forth.
Initially i started writing this in PHP, i have a server that is always on the internet, so i just lodged it as part of my site. Using a fetch routine, i would go and get the page that had results on it, and then parse the page, looking for the results, collate them and then just show all the results in one hit. It wasn't the most elegant thing, but it worked.
As you can guess i ran into a few problems, but i got there in the end.
With that done, my thought was that now every time someone wanted to use this, my server was the one fetching all the results, and that could be quite taxing on page responses.
Ran into lots of issues here, the big one was CORS or Cross-origin resource sharing. Basically i couldn't grab the site locally then serve it up to you. This is pretty much how scammers work lol.
I had been talking to a friend at work randomly about being able to get data from pages that didn't have any sort of API. He had recently come across a project that turned any website into an API! In walks wrapAPI!