This project periodically checks a specified website for TOEFL voucher availability and sends notifications via Bale Messenger, an Iranian messaging platform. The script is designed to bypass internet censorship by using Bale for notifications, ensuring you are alerted in real-time when vouchers become available.
The project is containerized with Docker, making it easy to deploy and run across various environments.
- Periodic Website Monitoring: Automates checking a website for specific content updates.
- Bale Messenger Notifications: Alerts are sent directly to your Bale account to bypass internet restrictions.
- Environment Configurations: Easy setup with
.env
for sensitive information like tokens and chat IDs. - Dockerized Deployment: Portable and isolated environment for hassle-free execution.
Before running the project, ensure you have the following installed:
- Docker: Get Docker
- Python 3.10: For local development (if not using Docker).
- Bale Bot Token and Chat ID: Obtain these by creating a bot on Bale Messenger.
.
├── Dockerfile # Docker configuration for containerized deployment
├── requirements.txt # Python dependencies
├── scraper.py # Main script to check website and send notifications
├── .env # Environment variables (not included in the repo)
└── README.md # Project documentation
Clone this repository to your local machine:
git clone https://github.com/Khalilolgod/sanjesh-toefl.git
cd sanjesh-toefl
Create a .env
file in the project directory with the following content:
BOT_TOKEN=<your_bale_bot_token>
CHAT_ID=<your_bale_chat_id>
Replace <your_bale_bot_token>
and <your_bale_chat_id>
with your Bale bot's token and your chat ID, respectively.
Build the Docker image using the provided Dockerfile:
docker build -t toefl-voucher-notifier .
Run the container with the following command:
docker run toefl-voucher-notifier
The script will now start monitoring the website and send notifications to Bale if vouchers become available.
If you prefer to run the script without Docker, follow these steps:
-
Install Dependencies:
Ensure Python 3.10 is installed. Then, install the required dependencies:
pip install -r requirements.txt
-
Run the Script:
Execute the script locally:
python scraper.py
- Monitoring Interval: Adjust the frequency of checks by modifying the appropriate line in
scraper.py
. - Target Website: Change the URL and search logic in
scraper.py
to monitor different websites.
Contributions are welcome! Feel free to submit issues or pull requests to improve the project.
Enjoy hassle-free monitoring and notification for TOEFL voucher availability! 😊