• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • Hi Guest, The forum software has been updated!
    Please let me know if you spot anything that isn't working as expected.
    I hope you find your way around OK!!!
    Have a great Christmas Guest.
    Best Wishes
    Ark Royal
  • There seems to be a problem with some alerts not being emailed to members. I have told the hosts and they are investigating.
  • Sorry for any problems caused to those that were trying to access the forum earlier today

    There was an authentication issue between the webservers and the database servers we are on!
    Many Thanks to those that emailed me to let tme know of the issue.


Scrape racingpost cards with python please help

yes I read the article when it was posted on here last time.

An edge - I'm not really much of a gambler, this is a serious hobby I took up in retirement, having last been heavily interested in racing in the mid 1970's (barring a brief flurry 10 years back). I do put a few bob on now and again, but my main 'edge' is that I am improving in my ability to figure a race out, which I think of as solving a very difficult puzzle, and finding that ability boost helps me when I do decide to have a few bob on.

I suppose I'm only human, so if I consistently got stupendous results I'd probably see how quickly I could have my accounts closed by winning too often, but right now I'm some way short of that - my 'filters' list each day is the closest I have got so far to having a methodical winner finder.... and it isn't consistent.

From what I've seen on here, if knowledge about the game is what counts, then @Chesham is the chap to emulate!

Hi @JamesSmith hows the coding going i myself have not done much as getting ready to move house, passed my driving test and other things going on it's got neglected a bit but hope you are still at it and i hope to be having another go soon.
Hi @SteveT hope all is well with you. I am Still struggling with my attempts at scrapping the racingpost Progress is slow despite all the great help from @davejb. I enjoy learning how to scrape sites from all the guides available but when it comes to converting it to something that would work with the racingpost I end up with a screen full of rubbish. I find it hard to just pick the bits out that I am after despite having the links for them. I will preserve hope to get there in the end. James
Hi @JamesSmith
I know what you mean mate it does get a bit baffling at times and just started again today i needed to have a little break as my head was spinning with it and like you i am enjoying it and i'm well thank you James between my ratings work and python it's certainly keeping me busy lol.
Can you explain to me how you use your Scripts to scrape the data from the RP.

Welcome to the forum...

Yeah, there is a readme on the page I linked to. Are you familiar with github or running python scripts?

Apologies if anyone tried the profile search, I forgot I had to make some changes to the urls in order to directly get the json response, ive fixed it now.
Last edited:
ive added a new script, it scrapes the results data for either a country or an individual track, for a specific year or a given range of years

it will be buggy and needs a lot of testing to get get all the errors ironed out so if anyone tries it, would be grateful if errors were reported here or via the issues on github

instructions are in the readme

example of the csv ascot 2018

Last edited:
some updates since last post:

fixed issue with horses pulled up/fallen etc not being recorded, fixed issue with not all races being recorded which was due to a forced 60 second wait after too many requests in short space of time, all races and all runners are now being recorded

added pedigree info and finishing time for all runners based on winning time and bha lengths per second calculation

added interactive shell and simpler commands rather than flags etc, added search feature to find course or region codes, added tab completion for linux