results.py script fetches race results including finishing positions, points awarded, and race outcomes for each driver.
Script Overview
Location:~/workspace/source/results.py
The script uses the RaceResultsFetcher class to:
- Fetch race results for specific rounds
- Handle rate limiting automatically
- Save results to the appropriate race directory
- Log all operations for debugging
API Endpoint
RaceResultsFetcher Class
Initialization
Rate-Limited Requests
The class implements adaptive rate limiting:Fetching Race Information
Fetching Results
Main Fetch Method
Output Structure
Stored at:{year}/{race-name}/results.json
Usage Example
Basic Usage
Multiple Rounds
The script includes logging to both a file (
race_results_fetch.log) and the console for easy monitoring.Results Data Fields
Each result contains:Logging Configuration
The script uses structured logging:Related Scripts
Events
Must run first to create race directories
Qualifying
Fetch qualifying results next