Unofficial HTML to JSON parser for eResults. Tested with eResults Lite 3 and 4.
- eResults Lite 3 and 4 support.
- Automatically detects if results or splits.
- Outputs easy to read JSON.
GET /?url=https://domain.test/index.html
Parameter | Type | Description |
---|---|---|
url |
string |
Required. Url to html document. |
The parser calculates automatically whether the document is invalid, a result- or sprint-document.
If an error occurs, the service responds with 500
and an error message, otherwise 200
with a JSON payload.
{
"results": [{
"participants": [{
"association": string | null,
"diff": number | null,
"name": string,
"position": number | null,
"time": string | null
}],
"statistics": {
"started": number,
"exited": number,
"disqualified": number
},
"route": {
"length": number,
"name": string
}
}],
"routes": [{
"length": number,
"name": string
}],
"title": string
}
{
"results": [{
"participants": [{
"increments": [
{
"rank": number,
"time": string,
"diff": number,
} | null
],
"name": string,
"position": number | null,
"splits": [
{
"rank": number,
"time": string,
"diff": number,
} | null
],
"time": string | null
}],
"statistics": {
"started": number,
"exited": number,
"disqualified": number
},
"route": {
"length": number,
"name": string
}
}],
"routes": [{
"length": number,
"name": string
}],
"title": string
}
- Node.js version 18 or higher
Clone the repository and install the package dependencies using the following command:
$ npm install
Unit tests are written with Jest testing library.
To run tests locally, run the following command:
$ npm test
MIT