Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RTA Slot Sniper 🎯

Python 3.10+ License: MIT Code style: black

A Python tool for monitoring and automatically booking NSW driving test slots through the Service NSW booking system (myrta.com).

πŸš— Features

  • Continuous Monitoring: Automatically checks for available slots at configurable intervals
  • Multi-Centre Support: Monitor multiple test centres simultaneously
  • Smart Filtering: Filter slots by date range and preferred centres
  • Auto-Booking: Automatically book slots when they become available (optional)
  • Notifications: Get notified via Telegram and/or desktop notifications
  • Anti-Detection: Browser impersonation to avoid bot detection
  • Configurable: YAML-based configuration for easy customization

πŸ“‹ Prerequisites

  • Python 3.10 or higher
  • An existing driving test booking with Service NSW
  • Your booking ID and surname

πŸš€ Quick Start

1. Clone the Repository

git clone https://github.com/yourusername/rta-slot-sniper.git
cd rta-slot-sniper

2. Install Dependencies

# Using pip
pip install -r requirements.txt

# Or using pip with optional notifications
pip install -r requirements.txt plyer

# Or install as a package
pip install -e .

3. Create Configuration

cp config/config.example.yaml config/config.yaml

Edit config/config.yaml with your details:

booking:
  booking_id: "YOUR_BOOKING_ID"
  surname: "YOUR_SURNAME"
  phone_number: "04XXXXXXXX"

search:
  postcode: "2036"
  suburb_name: "Eastgardens"
  search_dates:
    - "10/11/2025"
    - "17/11/2025"
  slot_after: "10/11/2025 08:00"
  slot_before: "30/11/2025 17:00"
  centre_whitelist:
    - "Marrickville"
    - "Botany"
    - "Eastgardens"

4. Run the Sniper

# Run with default config
python -m src.main

# Or if installed as a package
rta-sniper

πŸ“– Usage

Command Line Options

usage: rta-sniper [-h] [-c FILE] [-v] [--dry-run] [--once] [--version]

Monitor and automatically book NSW driving test slots.

options:
  -h, --help            show this help message and exit
  -c FILE, --config FILE
                        Path to configuration file (default: config.yaml)
  -v, --verbose         Enable verbose/debug logging
  --dry-run             Check for slots but don't book (notification only mode)
  --once                Run a single check then exit (don't loop)
  --version             show program's version number and exit

Examples

# Standard monitoring mode
python -m src.main

# Use a custom config file
python -m src.main -c /path/to/my-config.yaml

# Notification-only mode (don't auto-book)
python -m src.main --dry-run

# Single check (useful for cron jobs)
python -m src.main --once

# Verbose output for debugging
python -m src.main -v

βš™οΈ Configuration Reference

Booking Settings

Option Description Required
booking_id Your Service NSW booking reference Yes
surname Surname on the booking Yes
phone_number Contact number for confirmation Yes

Search Settings

Option Description Required
postcode Postcode to search for centres Yes
suburb_name Specific suburb (for disambiguation) No
search_dates List of dates to check (DD/MM/YYYY) Yes
slot_after Only book slots after this time No
slot_before Only book slots before this time No
centre_whitelist List of preferred centres No

Timing Settings

Option Default Description
recheck_interval 30 Seconds between checks
renotify_interval 1800 Seconds before re-notifying about same slot

Notification Settings

Telegram

notifications:
  telegram:
    enabled: true
    bot_token: "YOUR_BOT_TOKEN"
    chat_id: "YOUR_CHAT_ID"

To set up Telegram notifications:

  1. Create a bot via @BotFather
  2. Get your chat ID via @userinfobot
  3. Add the bot to your chat/channel

Desktop Notifications

notifications:
  desktop:
    enabled: true

Requires the plyer package: pip install plyer

πŸ—οΈ Project Structure

rta-slot-sniper/
β”œβ”€β”€ config/
β”‚   └── config.example.yaml    # Example configuration
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ __init__.py           # Package initialization
β”‚   β”œβ”€β”€ api_client.py         # RTA website API client
β”‚   β”œβ”€β”€ config.py             # Configuration loader
β”‚   β”œβ”€β”€ main.py               # CLI entry point
β”‚   β”œβ”€β”€ notifications.py      # Notification handlers
β”‚   └── sniper.py             # Main orchestration logic
β”œβ”€β”€ tests/                    # Unit tests
β”œβ”€β”€ pyproject.toml            # Project metadata
β”œβ”€β”€ requirements.txt          # Dependencies
└── README.md                 # This file

πŸ”§ Development

Setting Up Development Environment

# Clone and enter directory
git clone https://github.com/yourusername/rta-slot-sniper.git
cd rta-slot-sniper

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install with dev dependencies
pip install -e ".[dev,notifications]"

Running Tests

pytest

Code Formatting

# Format code
black src/
isort src/

# Lint
ruff check src/
mypy src/

⚠️ Disclaimer

This tool is for personal use only. Please:

  • Use responsibly and respect Service NSW's terms of service
  • Don't abuse the system with excessive requests
  • Keep check intervals reasonable (30+ seconds recommended)
  • Only use for your own legitimate bookings

The author is not responsible for any misuse of this tool.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Built with curl-cffi for browser impersonation
  • Notifications powered by plyer

Note: This project is not affiliated with Service NSW or Roads and Maritime Services.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages