Skip to content

ifmcjthenknczny/racefacer-lap-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Racefacer Lap Scraper

Overview

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.

What you need to know - put briefly

  • 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.

Installation

Prerequisites

  • Deno 2.1.4
  • npm (v6 or higher)
  • Deno

Setup

Clone the Repository:

git clone https://github.com/ifmcjthenknczny/racefacer-lap-scraper
cd racefacer-lap-scraper

Install Dependencies:

Run the following command to install all necessary dependencies:

deno install --frozen=true

Usage

Configuration

Ensure that the .env file's envirormental variables for login EMAIL and PASSWORD are correctly set up.

Running the Script

To run the script and scrape the lap times, execute the following command:

npm start

This command will transpile TypeScript files and run them.

Output

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.

Features

  • 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 Microsoft Windows.

Contributing

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.

License

This project is licensed under the MIT License.

Contact

For questions or feedback, please reach out via GitHub. ifmcjthenknczny

About

Scraper for Racefacer lap time history using puppetter with Deno.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published