JLV would be the one to know, but posting in case anyone else knows as well.
Is there JSON data of each race result that's stored somewhere? I know there is track records of each stored like this http://mxsimulator.com/servers/elsinore ... ecords_all but was wondering if the individual races were.
I'm working on a project for school that I may be able to translate over to MXS if there is. Haven't looked too hard honestly, just curious if there was before I dug.
JSON for Race Results?
-
- Posts: 1931
- Joined: Fri Jun 21, 2013 5:38 pm
- Team: Elevated Motorsports
JSON for Race Results?
TeamHavocRacing wrote:it's all the liberals fault
Re: JSON for Race Results?
No. The individual races are in the server results format. There are a lot of results that have to be stored and the server format is more compact than JSON.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Re: JSON for Race Results?
I'm not recommending this as I don't know how jlv would feel about scraping the html on race result pages, but this script seems to parse the server results format, then print out the rows/columns as html. I know it could be repurposed to build json objects.DBRider251 wrote: ↑Wed Feb 17, 2021 3:09 am JLV would be the one to know, but posting in case anyone else knows as well.
Is there JSON data of each race result that's stored somewhere? I know there is track records of each stored like this http://mxsimulator.com/servers/elsinore ... ecords_all but was wondering if the individual races were.
I'm working on a project for school that I may be able to translate over to MXS if there is. Haven't looked too hard honestly, just curious if there was before I dug.
https://mxsimulator.com/racestats.js
You could also just scrape the tables themselves without trying to use this script, but again, don't know how jlv would feel about scraping the pages or the load it could put on the server if you try to fetch/parse a bunch of pages.
-
- Posts: 1931
- Joined: Fri Jun 21, 2013 5:38 pm
- Team: Elevated Motorsports
Re: JSON for Race Results?
I seen that, but I just moved to a python scraper. It gave me the information needed, and I only scrape when I make a request to make the stats for that race. I don't think it would be too bad.baker wrote: ↑Thu Mar 11, 2021 5:28 pm I'm not recommending this as I don't know how jlv would feel about scraping the html on race result pages, but this script seems to parse the server results format, then print out the rows/columns as html. I know it could be repurposed to build json objects.
https://mxsimulator.com/racestats.js
You could also just scrape the tables themselves without trying to use this script, but again, don't know how jlv would feel about scraping the pages or the load it could put on the server if you try to fetch/parse a bunch of pages.
TeamHavocRacing wrote:it's all the liberals fault
Re: JSON for Race Results?
Baller, sounds like that will do the trick. I don’t think individually scraping pages on an as needed basis is bad at all. Exactly the same as loading the page in the browser.DBRider251 wrote: ↑Fri Mar 12, 2021 3:07 amI seen that, but I just moved to a python scraper. It gave me the information needed, and I only scrape when I make a request to make the stats for that race. I don't think it would be too bad.baker wrote: ↑Thu Mar 11, 2021 5:28 pm I'm not recommending this as I don't know how jlv would feel about scraping the html on race result pages, but this script seems to parse the server results format, then print out the rows/columns as html. I know it could be repurposed to build json objects.
https://mxsimulator.com/racestats.js
You could also just scrape the tables themselves without trying to use this script, but again, don't know how jlv would feel about scraping the pages or the load it could put on the server if you try to fetch/parse a bunch of pages.