Hi Guys,
Scraping most data from the Racing Post website seems fairly easy to do using standard HTTP Get commands and then parsing the HTML. However, when it comes to getting the data for the live odds shows, this information is not returned in the page html.
It looks like they have got some some of applet call back to the server to periodically refresh the odds. I've montiered the site using iewatch, but are just getting a "FAIL/" message when attempting the same POST command that appears to be on a timer. All of my POST headers appear to match up cookies included.
Anyone successfully got this data or have any pointers ?
Cheers
I don't use the Racing Post but they are probably using AJAX in the background. Rather than refreshing the whole page, they are probably using JavaScript's XMLHttpRequest() function and then inserting the relevant data. Take a look at the HTML and check the source code of any imported .js files.
Cheers, managed to work it out in the end.
They are in fact using AJAX to call back to the server to get the data. Managed to debug the Javascript with IE8's `Developer Tools` function. Quite a useful tool actually. The parameters needed to post back are a bit hard to fathom but got there in the end.