Code Monkey home page Code Monkey logo

muquestionpaperbot's Introduction

MUQuestionPaperBot

Telegram Bot

This is a Telegram chatbot that fetches PDFs of questions papers that have been asked by the Mumbai University.

muquestionpapers.com hosts PDFs for most if not all previously asked question papers for Engineering in Mumbai University. The bot scrapes this website and sends the PDFs to the user directly on the Telegram app using the Telgram Bot API.

Created this as a side-project to avoid opening a website and going through the steps everytime I wish to find a question paper.

The bot is hosted online on Heroku.

Getting started with Telegram Bots

Chatbots are fun, and Telegram has one of the best APIs to make one. This project uses the python-telegram-bot wrapper which provides a Python interface for the Telegram API.

Introduction to Telegram Bots

Your First Bot using python-telegram-bot

Run your own instance of MUQuestionPaperBot

  1. Create a new bot with BotFather and copy the API TOKEN

  2. Clone this repository

  3. Run pip install -U -r requirements.txt to install the dependencies

  4. Create a .env file in the bots directory with the following content:

    TOKEN = your_token_here

  5. Set DEBUG to True in telegram_bot.py

  6. Run telegram_bot.py

muquestionpaperbot's People

Contributors

arionmiles avatar funoctis avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

muquestionpaperbot's Issues

Feature: Option for a single PDF with all papers merged

An option to either merge all pdfs for the selected subject or send them individually.

  • Download the pdf on the bot server,

  • Utilise PyPDF2 to merge the PDFs

  • Send to the user.

In the future:

  • To save time, keep merged copies stored locally (heroku doesn't allow saving to disk permanently, so might wanna look into storing it someplace else)

  • When a merged pdf for a particular subject is requested, check if May or December has passed, and if it has, scrape the PDFs again and replace the previously merged pdf with a new one, accounting for new papers being uploaded on the site.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.