A Python automation tool that monitors multiple sources for new SHiFT codes for Borderlands 4, automatically attempts to redeem them, and sends notifications for updates and results.
Disclaimer: I'm not affiliated with Gearbox Software at all - just a passionate fan who built this so I don't miss SHiFT code drops while trying to adult responsibly. Because who has time to manually check websites when you could be automating your loot addiction?
This tool requires storing SHiFT login credentials and session cookies. Use at your own risk and ensure you understand the security implications. The tool is provided "as is" without any warranties.
Security Features:
- Optional cookie encryption using Fernet symmetric encryption
- Secure key derivation using PBKDF2 with 100,000 iterations
- Environment variable-based configuration for sensitive data
- Scrapes multiple official and community sources for SHiFT codes.
- Monitors Reddit RSS feed for real-time SHiFT code discovery (every 3-5 minutes).
- Handles login and session management with Playwright for manual cookie refresh.
- Rate-limited automation to mimic human-like code redemption timing.
- Sends notifications using Apprise (supports Telegram, etc.).
- Real-time console updates with colored status output and progress bar.
- Modular, extensible Python codebase.
- Python 3.10+ (tested with Python 3.13)
- Playwright (with installed browsers)
- Requests, Colorama, tqdm, python-dotenv, apprise, cryptography Python packages
Clone this repository:
git clone https://github.com/klept0/SHiFT-Code-Watcher.git
cd SHiFT-Code-WatcherCreate a Python virtual environment (recommended):
python -m venv venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # WindowsInstall dependencies:
pip install -r requirements.txtInstall Playwright browsers:
playwright installCopy .env.example to .env and update your APPRISE_URL for notifications:
cp .env.example .env
# Then edit .env to add your Apprise URLRun the watcher script to start monitoring and redeeming codes:
python shift_watcher.pyFor verbose output with detailed logging and browser inspection (useful for debugging):
python shift_watcher.py --verboseFor Reddit RSS monitoring mode (checks Reddit every 3-5 minutes for new SHiFT codes):
python shift_watcher.py --redditCombine with verbose mode for detailed Reddit monitoring output:
python shift_watcher.py --reddit --verboseThe script runs continuously, checking for new codes every hour by default (or every 3-5 minutes in Reddit mode), and provides live progress updates.
Note: The script will automatically check for required dependencies on startup and provide helpful error messages if any modules are missing.
- Modify
SCAN_INTERVALinconfig.pyto change how often the script runs. - Add or remove URLs in the
SOURCESlist inconfig.pyto customize code sources. - Store login session cookies securely; the script uses Playwright to refresh cookies when needed.
- Configure Apprise notification endpoints via the
.envfile. - Optionally set the
SHIFT_PLATFORMenvironment variable (xbox,playstation,steam, etc.) to auto-select a platform when redemption offers multiple choices.
- Login fails: Ensure your SHiFT account credentials are correct and cookies are fresh
- No codes found: Check your internet connection and verify the sources are accessible
- Playwright errors: Run
playwright installto ensure browsers are installed - Rate limiting: The tool includes built-in delays; avoid running multiple instances
- Check the console output for detailed error messages
- Verify your
.envfile contains the correctAPPRISE_URL - Ensure all dependencies are installed:
pip install -r requirements.txt
Contributions are welcome! Please:
- Fork the repository.
- Create feature branches.
- Submit pull requests with clear descriptions.
- Follow the existing code style and modular structure.
If you find this tool helpful and want to support its development, consider buying me a coffee! ☕
This project is licensed under the MIT License - see the LICENSE file for details.