Skip to content

zenjahid/ULAB-Result-Monitoring-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ULAB Result Monitoring Bot

A Telegram bot that automatically monitors and notifies you about ULAB (University of Liberal Arts Bangladesh) course result updates from the URMS system.

Python Telegram Bot License

🌟 Features

  • Automatic Monitoring: Checks for result updates every 2 hours
  • Smart Notifications: Only notifies you when results are actually updated (no spam!)
  • Course Selection: Choose specific courses to monitor
  • Instant Checks: Manual result checking with /checknow command
  • Pagination: View all your courses in organized pages
  • Secure: Personal bot with user authentication
  • In-Memory Storage: No database required, all data stored in memory

πŸ“‹ Prerequisites

  • Python 3.8 or higher
  • A Telegram account
  • ULAB URMS credentials (Student ID and Password)
  • Telegram Bot Token (from @BotFather)

πŸš€ Installation

  1. Clone the repository

    git clone https://github.com/zenjahid/ULAB-Result-Monitoring-Bot.git
    cd ULAB-Result-Monitoring-Bot
  2. Install required packages

    pip install -r requirements.txt
  3. Create a .env file

    Create a .env file in the project root and add:

    BOT_TOKEN=your_telegram_bot_token_here
    AUTHORIZED_USER_ID=your_telegram_user_id_here
    • BOT_TOKEN: Get this from @BotFather on Telegram
    • AUTHORIZED_USER_ID: Your Telegram user ID (you can get it from @userinfobot)
  4. Run the bot

    python main.py

πŸ”§ Configuration

Getting Your Bot Token

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the instructions
  3. Copy the bot token provided by BotFather
  4. Paste it in your .env file

Getting Your User ID

  1. Open Telegram and search for @userinfobot
  2. Start the bot and it will show your user ID
  3. Copy your ID and paste it in your .env file

πŸ“– Usage

Quick Start

  1. Start the bot on Telegram
  2. Send /start to see the welcome message
  3. Set your credentials: /setcred 221014099|yourpassword
  4. View your courses: /showcourses
  5. Set courses to monitor: /setcourses ENG2821 CSE4099
  6. The bot will automatically check every 2 hours and notify you of updates!

Available Commands

Command Description
/start Display welcome message and bot information
/setcred student_id|password Set your ULAB URMS credentials
/showcourses View all your courses with pagination
/setcourses CODE1 CODE2 Set specific courses to monitor
/checknow Manually check for result updates
/status View bot status and monitored courses
/stop Stop monitoring and clear all data

Example Workflow

1. /setcred 221014099|mypassword123
   βœ… Credentials Verified!
   πŸ“Š Found 45 courses in your record.

2. /showcourses
   πŸ“š Available Courses (Page 1/5)

   1. CSE1102 - 3.0 credits - A
   2. MAT1101 - 3.0 credits - A-
   3. ENG2821 - 3.0 credits - ⏳ Pending
   ...

3. /setcourses ENG2821 CSE4099
   βœ… Courses Set for Monitoring!
   πŸ“Š Monitoring 2 courses:
   β€’ ENG2821 - 3.0 credits - ⏳ Pending
   β€’ CSE4099 - 3.0 credits - ⏳ Pending

   πŸ”” Monitoring Started!

4. [2 hours later, if results updated]
   πŸŽ‰ AUTO-CHECK: RESULTS UPDATED!
   β€’ ENG2821 - 3.0 credits - A
   βœ… Found 1 updated result(s).

πŸ“¦ Dependencies

  • python-telegram-bot - Telegram Bot API wrapper
  • requests - HTTP library for API requests
  • beautifulsoup4 - HTML parsing
  • python-dotenv - Environment variable management

See requirements.txt for specific versions.

πŸ”’ Security & Privacy

  • The bot uses in-memory storage only (no database)
  • Credentials are stored only during runtime
  • Only the authorized user (specified in .env) can use the bot
  • Use /stop to clear all stored data immediately
  • Never share your .env file or commit it to git

πŸ› οΈ Technical Details

How It Works

  1. Authentication: Uses ULAB URMS login system
  2. Web Scraping: Parses HTML tables from the URMS status page using BeautifulSoup
  3. Background Monitoring: Runs a daemon thread that checks every 2 hours
  4. Change Detection: Compares previous results with current results
  5. Notifications: Sends Telegram messages only when changes are detected

Project Structure

ula_bot/
β”œβ”€β”€ main.py              # Main bot script
β”œβ”€β”€ requirements.txt     # Python dependencies
β”œβ”€β”€ .env                 # Configuration (not in repo)
└── README.md           # This file

πŸ› Troubleshooting

Bot not responding

  • Check if the bot is running
  • Verify your AUTHORIZED_USER_ID is correct
  • Ensure you're using the correct bot on Telegram

Wrong credentials error

  • Double-check your student ID and password
  • Make sure you're using the format: /setcred ID|password
  • Verify your URMS account is active

Not receiving notifications

  • Ensure monitoring is active (check with /status)
  • Verify courses are set (use /setcourses)
  • Check if results have actually changed

🀝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

πŸ“ License

This project is MIT licensed.

πŸ‘¨β€πŸ’» Author

Zen Jahid

  • GitHub: @zenjahid
  • Telegram: Contact via the bot!

⭐ Show Your Support

Give a ⭐️ if this project helped you!


Disclaimer: This is an unofficial bot and is not affiliated with or endorsed by the University of Liberal Arts Bangladesh (ULAB). Use at your own discretion.

About

πŸ€– Telegram bot for automated monitoring of ULAB course results with instant notifications when grades are published

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages