• Hi Guest, The software has been updated but I have not had a chance to tweak anything yet.
    It took longer than I had hoped, so I just turned it on and hope everything is OK
    If you spot anything that does not look rigfhyt then please let me know.
    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.
  • Hi Guest, If you are seeing that Lurker has appeared under your name then please take a look here to see why. AR

Scrape racingpost cards with python please help

davejb

Gelding
Hi,
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!

Dave
 

SteveT

Gelding
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.
cheers
steveT
 

JamesSmith

Yearling
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
 

SteveT

Gelding
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.
cheers
steve
 

4a47

Yearling
Can you explain to me how you use your Scripts to scrape the data from the RP.

Welcome to the forum...

Mike.
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:

4a47

Yearling
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

data1.png
data2.png
 
Last edited:

4a47

Yearling
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
 
Top