This project performs web scraping on the ICETEX scholarship page, stores the data in Firebase, and notifies about new scholarships via Telegram and configurable webhooks.
- Web Scraping: Extracts scholarship information from the ICETEX website.
- Firebase: Stores scraped scholarships and verifies if they are new.
- Notifications:
- Telegram: Sends notifications to a specified group or user.
- Webhooks: Sends data to user-defined endpoints.
- Automation: Configurable via cron jobs to execute daily at 9:00 a.m.
icetex-scholarship-notifier/
├── configs/
│ ├── firebase.json # Firebase configuration
│ ├── webhooks.json # Webhooks configuration
├── src/
│ ├── config.py
│ ├── firebase.py
│ ├── app.py
│ ├── notifications.py
│ ├── scraper.py
├── cronjob
├── Dockerfile
├── requirements.txt
└── README.md
-
Python 3.9+
-
Docker (Optional): To run in a containerized environment.
-
Required environment variables:
TELEGRAM_BOT_TOKEN: Telegram bot token.TELEGRAM_CHAT_ID: Telegram chat ID (group or user).
-
JSON files:
configs/firebase.json: Firebase project credentials.configs/webhooks.json: List of configured webhooks.
git clone https://github.com/your-username/icetex-scholarship-notifier.git
cd icetex-scholarship-notifierMake sure to activate a virtual environment:
pip install -r requirements.txtCreate a .env file in the root directory with the following variables:
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_idPlace firebase.json and webhooks.json inside the configs/ directory.
-
firebase.json: Credentials generated from the Firebase console.
-
webhooks.json: Example:
[ { "url": "https://example-webhook-url.com/notify", "method": "POST", "headers": { "Content-Type": "application/json", "Authorization": "Bearer YOUR_TOKEN" }, "message_body_key": "text", "additional_body": { "priority": "high", "type": "scholarship_notification" } } ]
The webhooks.json file defines how the project sends data to external endpoints. Each webhook should be an object with the following properties:
url: The endpoint to send the data.method: HTTP method to use (e.g.,POST,PUT).headers: Optional. HTTP headers required by the webhook.message_body_key: The key in the request body where the scholarship message will be inserted.- For example, if
message_body_keyis"text", the request body will look like this:{ "text": "🎓 New Scholarship Available!", "priority": "high", "type": "scholarship_notification" }
- For example, if
additional_body: Optional. Additional data to include in the body of the request.
python src/app.pydocker build -t icetex-scholarship-notifier .You can specify individual JSON files or the entire directory. For individual files, use the following:
docker run -d \
--name icetex-scholarship-notifier \
--env TELEGRAM_BOT_TOKEN=your_bot_token \
--env TELEGRAM_CHAT_ID=your_chat_id \
-v $(pwd)/configs/firebase.json:/app/configs/firebase.json:ro \
-v $(pwd)/configs/webhooks.json:/app/configs/webhooks.json:ro \
icetex-scholarship-notifierNotes:
- You can mount the entire
configs/folder if preferred:-v $(pwd)/configs:/app/configs:ro- The
:roflag ensures the JSON files are mounted as read-only for added security.
The project includes a configuration to run the script automatically at 9:00 a.m. daily. This can be set up using a cron job on the operating system or by running the Docker container with an orchestration tool like Kubernetes.
Example cron job for a local server:
0 9 * * * cd /path/to/icetex-scholarship-notifier && python src/app.py- Fork the repository.
- Create a branch for your feature:
git checkout -b feature/new-feature
- Submit a pull request.
This project is public. Feel free to use and adapt it to your needs.

