How kushdoshi07/result-finder-telegram-bot works
Project type and purpose
• This is a small, single-service Telegram bot written in Python.
• Purpose: accept a student’s seat number via Telegram, fetch exam results from a university website, parse the HTML, and return structured data (SGPA, CGPA, backlogs, pass/fail).
File structure
• Top level only:
• README.md – project description, use cases
• bot.py – the entire application logic lives here
• No DB or cache directory, no separate modules; everything is in one Python script.
Extract insights from the README
• Features:
• Result Lookup command
• Inline button interface to choose which metric to display
• Customizable to other university systems
• Underlying libraries likely used (not shown in file tree) include:
• python-telegram-bot (or similar) for Telegram API
• requests or aiohttp for HTTP fetch
• BeautifulSoup or lxml for HTML parsing
Main components
a. Telegram User (mobile or desktop app)
b. Telegram Bot API (cloud-hosted Telegram service)
c. Bot Application (bot.py)
– Update Handler / Dispatcher
– Command Handlers (/start, /result, etc.)
– Inline Button Handler
– Result Fetcher Module
• HTTP Client
• HTML Parser
• Data Extractor
– Response Formatter
d. University Website (external HTTP endpoint)
Relationships / data flow
1. User ► sends message/command ► Telegram API
2. Telegram API ► forwards update ► Bot Application
3. Bot Application ► issues HTTP GET/POST ► University Website
4. University Website ► returns HTML ► Bot Application
5. Bot Application ► parses & formats ► Telegram API
6. Telegram API ► delivers message ► User
Architectural patterns & design principles
• Single-process microservice
• Event-driven command handler pattern
• Separation of concerns inside bot.py:
• API layer (Telegram)
• Service layer (fetch & parse)
• Presentation layer (format response)
• Dependency on two external services: Telegram API and university result site
Relevant technologies/frameworks
• Python 3.x
• python-telegram-bot (or Telethon/aiogram)
• requests or aiohttp
• BeautifulSoup4 or lxml