An automated Python script using Selenium to rapidly test and redeem product codes on the EA website. This tool handles the entire process from logging in to entering codes in a high-speed loop.
This project is intended for educational and proof-of-concept purposes only. Automating login and submission processes may be against Electronic Arts' (EA) Terms of Service.
- Use at your own risk. The author is not responsible for any account suspension, bans, or other actions taken against your EA account as a result of using this script.
- Credential Security: This script requires you to enter your email and password directly into the
automation.pyfile. Be extremely careful with this file and never commit your credentials to a public GitHub repository.
- Automatic Login: Securely logs into your EA account at the start of the script.
- High-Speed Redemption Loop: Intelligently waits for server responses instead of using fixed delays, making the process as fast as possible.
- Dynamic Key Generation: Includes a
code_generator.pyscript to produce new keys on the fly. - Intelligent State Handling: Correctly identifies success, invalid code, and already-redeemed code responses.
- Detailed Console Logging: Provides a real-time, high-precision timestamped log of all actions for easy monitoring.
- Handles Complex UI: Navigates through iframes for both login and code redemption seamlessly.
The automation process follows these steps:
- Launch Browser: The script starts a new, clean instance of Google Chrome managed by Selenium.
- Navigate: It opens the specific EA Battlefield redeem page.
- Login Check: It checks if a "Login" button is present.
- If found, it navigates to the EA sign-in page, enters the credentials you provided, and waits for a successful redirect.
- If not found, it assumes the session is already active.
- Open Redeem Modal: After a successful login, it clicks the main "Redeem" button, which opens an iframe containing the code entry form.
- Enter Redemption Loop: The script enters its main loop:
- A new random code is generated by
code_generator.py. - The code is entered into the input field.
- The "Next" button is clicked.
- The script intelligently waits for either a success element (
Confirmbutton) or an error message to appear. - The result is logged, and the loop repeats with a new key.
- A new random code is generated by
- Termination: The script stops if a key is successfully redeemed or if a critical error occurs.
Before you begin, ensure you have the following installed:
- Python 3.8+
- pip (usually comes with Python)
- Google Chrome browser
Follow these steps to get the project running on your local machine.
1. Clone the Repository:
git clone https://github.com/EXELANCE-LLC/battlefield-6_reedem-key.git
cd battlefield-6_reedem-key2. Install Dependencies:
The project uses Selenium and webdriver-manager. Install them easily using the requirements.txt file.
pip install -r requirements.txtYou must configure your EA account credentials before running the script.
- Open the
automation.pyfile in a text editor. - Find the following section at the top of the file:
# --- SECURITY CREDENTIALS & CONSTANTS --- # SECURITY WARNING: NEVER SHARE THESE CREDENTIALS IN A PUBLIC REPOSITORY! USER_EMAIL = "your-email@example.com" # <-- CHANGE THIS USER_PASSWORD = "your-super-secret-password" # <-- CHANGE THIS ```3. Replace `"your-email@example.com"` with your EA account email.
- Replace
"your-super-secret-password"with your EA account password. - Save the file.
Warning: If you fork this repository on GitHub, make sure your fork is private or that you do not commit your credentials.
Once the setup and configuration are complete, you can run the bot from your terminal:
python automation.pyA new Chrome window will open and the automation process will begin. You can monitor all steps and key attempts in the terminal window where you ran the command.
.
├── automation.py # The main automation script with the bot's logic.
├── code_generator.py # Helper script for generating random redeem keys.
├── requirements.txt # A list of Python dependencies for the project.
└── README.md # This file.
This project is licensed under the MIT License. See the LICENSE file for more details.
MIT License
Copyright (c) 2025 [Your Name or GitHub Username]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.