Welcome to the UFC Fight Notifier! This script allows you to receive email notifications about UFC events, such as when a specific fight is about to start or has ended. It uses web scraping to get real-time data from the UFC website and sends alerts directly to your email.
- Receive notifications before a UFC fight starts.
- Get notified when a specific fight ends.
- Easy setup and configuration.
Before using this script, ensure you have the following:
- Python 3 installed. π
- Required packages installed (listed below).
- A Gmail account for sending notifications. Refer to this tutorial for help setting up a Gmail account: YouTube tutorial.
-
Clone the repository or copy the script to your local machine.
-
Install the necessary Python packages using pip:
git clone https://github.com/garantf/UFC-Notifier.git cd UFC-Notifier/ pip install -r requirements.txt
-
Edit the
creds.py
file containing your email credentials:email_user = "[email protected]" email_password2 = "your_app_password" email_receiver = "[email protected]"
Note:
email_user
is the email that will send the notifications.email_password
is the App Password for your Gmail account, not your account password.- To receive SMS notifications instead of an email, check your mobile provider's email-to-SMS gateway. For more information, visit this website.
β οΈ Important: The script uses Gmail's SMTP server for sending emails. Ensure you have App Passwords enabled on your Google account.
Follow these steps to use the UFC Fight Notifier:
-
Run the script:
python3 main.py
-
Enter Event and Fight Information:
- When prompted, enter the UFC event number (e.g., for UFC 280, enter "280").
- Enter the fight order number you wish to be notified about (e.g., "1" for the main event).
-
Set Notification Duration:
- Enter the number of hours for which the script should keep checking for updates.
-
Receive Notifications:
- The script will notify you before a fight starts and after it ends. π
- If an error occurs while sending the email, an error message will be printed in the console.
- Make sure the UFC event number is correct, or the script won't be able to fetch fight details.
- Store your credentials (
creds.py
) securely. Do not share your email or password publicly. - To avoid exposing your credentials, consider using environment variables or a secure vault.
- You can stop the script at any time by pressing
Ctrl + C
. βΉοΈ
_ _ ______ _____ _ _ _____ _____ _____ ______
| | | || ___|/ __ \ | \ | || _ ||_ _||_ _|| ___|
| | | || |_ | / \/ | \| || | | | | | | | | |_
| | | || _| | | | . ` || | | | | | | | | _|
| |_| || | | \__/\ | |\ |\ \_/ / | | _| |_ | |
\___/ \_| \____/ \_| \_/ \___/ \_/ \___/ \_|
This program will notify you when a fight has ended.
It will also notify you before a fight starts.
You can interrupt the program at any time by pressing Ctrl+C.
Please enter the UFC event number: 308
Please enter the fight order number (1=main event fight): 1
Enter the duration (in hours) for how long the program should repeat: 10
Contributions are welcome! Feel free to submit a pull request or open an issue to help improve this project.
This project is licensed under the MIT License. Feel free to use it in your own projects. π
Happy Watching! π₯³