When running a call to racecards.py tomorrow in order to pull saturday 18th cards, I'm receiving the below error:
Traceback (most recent call last):
File "C:\horses\scripts\racecards.py", line 413, in
main()
File "C:\horses\scripts\racecards.py", line 403, in main
races = parse_races(session, race_docs, date)
File "C:\horses\scripts\racecards.py", line 318, in parse_races
runners = get_runners(profile_urls, race['race_id'])
File "C:\horses\scripts\racecards.py", line 135, in get_runners
json_str = doc[1].xpath('//body/script')[0].text.split('window.PRELOADED_STATE =')[1].split('})()')[0].strip().strip(';')
Hello @4A47,
When running a call to racecards.py tomorrow in order to pull saturday 18th cards, I'm receiving the below error:
Traceback (most recent call last): File "C:\horses\scripts\racecards.py", line 413, in
main()
File "C:\horses\scripts\racecards.py", line 403, in main
races = parse_races(session, race_docs, date)
File "C:\horses\scripts\racecards.py", line 318, in parse_races
runners = get_runners(profile_urls, race['race_id'])
File "C:\horses\scripts\racecards.py", line 135, in get_runners
json_str = doc[1].xpath('//body/script')[0].text.split('window.PRELOADED_STATE =')[1].split('})()')[0].strip().strip(';')
IndexError: list index out of range