rpscrape icon indicating copy to clipboard operation
rpscrape copied to clipboard

Not Scraping Topspeed

Open viewform opened this issue 1 year ago • 8 comments

Excellent Script Great Work !

But it doesnt appear to scrape the Topspeed Column "TS" (as detailed in the example from Ascot)

Does anyone know why?

Regards

Keith

viewform avatar Sep 13 '24 14:09 viewform

create a copy of default_settings.toml called user_settings.toml in the settings folder and set ts to true, its false by default

https://github.com/joenano/rpscrape/tree/master/settings

joenano avatar Sep 13 '24 17:09 joenano

Cheers, got it, I didnt have a user_settings.toml file and didnt want to touch the default file Thanks, great piece of code, very useful. Ive still not worked out how to scrape the racecard from the JSON file. Which is the easiest way? Ive got the JSON file downloaded.

Thanks Keith

viewform avatar Sep 13 '24 18:09 viewform

OK so ive managed to get the JSON data for racecards to csv which is great, i noticed that the horses silks image url isnt an option in the "runners" section in the JSON file, what would be the easiest way to add this to the scrape?

Thanks

Keith

viewform avatar Sep 20 '24 07:09 viewform

Same answer as above... look at: https://github.com/joenano/rpscrape/tree/master/settings

[fields.runner_info]`
    silk_url = false    # Url of owners silks image

Create a copy of default_settings.toml called user_settings.toml in the settings folder and set silk_url to true. It is false by default.

rmwesley99 avatar Sep 22 '24 17:09 rmwesley99

Sorry, does this apply to thr racecards that are in JSON format as well as the results?

viewform avatar Sep 22 '24 19:09 viewform

No, the user_settings.toml file is just used to configure the data fields scraped for historical results.

rmwesley99 avatar Sep 22 '24 20:09 rmwesley99

I thought so, as I tried it and it didnt scrape the "silks" column,, would you know the easiest way to add this into the python file racecards.py so it will appear in the JSON file?

Thanks

viewform avatar Sep 22 '24 20:09 viewform

Like you say... you would need to make a local copy of racecards.py and add the code to download it. If you don't know any python, you will need to learn some. There is enough code in there that you can probably just cut-and-paste-and-edit a similar field. I use the race cards to automate the process of looking for potential betting opportunities so just need the course, race, horse, jockey, and trainer data, i.e. no need for the silks information cluttering up the JSON file. I'm guessing some / most others are probably the same.

rmwesley99 avatar Sep 23 '24 06:09 rmwesley99