Hi, I’m struggling with parsing (or even receiving) JSON from racedetails. The python requests & http snippets just return the horses but not the odds. I get the horse data but the odds show as an empty list []. Any ideas? Many thanks!
Aşağıya yorum ekleyerek tartışmaya katılın:
Ah! There is usually a simple explanation.
Thank you!
Hi Gramb0id,
you haven’t got odds because the race has finished. Odds are only available on non finished races.
Once race finished you should get sp (starting prices).
Thanks.
Best regards,
Alex
Hi, thanks for your prompt response.
Also I am rusty at python, requests etc. But I’ve tried dumping into file etc and I always get the same thing. An empty ‘odds’ list for each horse.
I also tried the python http snippet, and various different variations of the requests get method.
This is my code;
import requests
And this is what I get at the end of each horse in the response;
‘dam’: ‘TOQUE ROUGE(FR)’,
‘OR’: ‘’,
‘sp’: ‘67’,
‘odds’: []},
Hi Gramb0id,
It’s weird, we don’t have any issue about odds.
Can you check it again.
Thanks
Alex