It is customary for Betfair to not display apostrophes in horse names unlike other runner sources such as the Racing Post or Sporting Life. If you are producing your selections for betting or laying from a source that contains apostrophes then you need to strip them out when you look them up in Betfair ready for betting purposes. This is something I have always done without a problem until last week. For reasons only known to them Betfair decided to leave the dreaded apostrophe in on one of their runners and we all know what happened next. Yes the dam thing won at a Betfair SP of 16/1 costing me over 2k. Now it could have happened before and maybe it was my missing bet that has alerted me but I quickly changed my code to get round the situation. I know check for a horses name and if present grab its runner ID. If its not there I then remove any apostrophes and try again. If you are aware of any other peculiarities or if you take any other approach then let me know I would be interested to hear how you approach this problem. I have never been hot on grammer but from now on I will not be using apostrophes, I can’t bare the site of them. Oh dear there is one, too late.
Footnote – Actually doing a bit more digging and looks like its my fault. I have reprogrammed all my bots in Python from Perl. I mistakingly invoked the strip out apo’s from the horse name thus
Whereas I should have coded it as
horse = horse.replace(“‘”,””)
Python does not flag the first example as an error it simply does nothing with the value, which does not help.