Overview
Student Loan Checker is an automated Python bot built with Playwright that securely logs into the Student Loans Company (SLC) portal to retrieve comprehensive loan information. This tool automates the tedious process of manually checking loan balances and provides programmatic access to loan data. The bot handles the complete authentication flow including email/password login, cookie consent management, and two-factor authentication using secret codes. It navigates through the SLC portal, extracts detailed loan information including current balance, salary repayments, direct repayments, interest added, and current interest rates. Built with Python 3.11+ and Playwright, the bot features robust error handling, automatic cookie consent management, and support for both headless and visible browser modes.
Tech Stack
Key Features
- Automated login with email and password authentication
- Two-factor authentication (2FA) / secret code support
- Comprehensive data scraping - extracts balance, salary repayments, direct repayments, interest added, and interest rates
- Secure credential management via environment variables (.env file)
- Robust error handling with detailed error messages
- Automatic cookie consent management
- Headless and visible browser modes for flexibility
- Programmatic API - can be imported and used as a module
- Clean class-based architecture for easy extension
- Comprehensive documentation and setup instructions
Architecture
Bot Architecture
The SLCBot class encapsulates the entire Playwright browser session. Credentials are loaded from environment variables via python-dotenv. The bot can be run as a standalone script or imported as a module for programmatic use.
Authentication Flow
The bot handles the full multi-step SLC authentication sequence, including automatic cookie consent dismissal and optional 2FA via secret code.
Screenshots
Bot Execution and Loan Data Output
