This project is a Deno application designed to scrape lap time data from the Racefacer website using Puppeteer. It automates the process of extracting session lap times for all available tracks with logging in. The data is then saved as JSON files for further use.
- Clone repo, install deno if you don't have it, install packages.
- Copy
.env_sample
file and rename it to.env
. Put remaining envs - your credentials for logging in. - Run the code.
- Deno 2.1.4
- npm (v6 or higher)
- Deno
git clone https://github.com/ifmcjthenknczny/racefacer-lap-scraper
cd racefacer-lap-scraper
Run the following command to install all necessary dependencies:
deno install --frozen=true
Ensure that the .env
file's envirormental variables for login EMAIL
and PASSWORD
are correctly set up.
To run the script and scrape the lap times, execute the following command:
npm start
This command will transpile TypeScript files and run them.
The script will create an out
directory in the project root if it doesn't already exist. All generated JSON files containing the scrape results will be saved in this directory.
- Automated login to Racefacer.
- Bypasses cookie consent dialogs.
- Scrapes lap time data for multiple tracks in chronological order. Time is expressed in seconds.
- Saves data in JSON format for easy analysis.
- Provides config file in case selectors change in the future.
- Compatibile with
Feel free to submit issues or pull requests if you find any bugs or want to add new features. Please ensure that your code follows the project's style guidelines.
This project is licensed under the MIT License.
For questions or feedback, please reach out via GitHub. ifmcjthenknczny