Giter VIP home page Giter VIP logo

adiprogrammer7 / cowin_telegram_bot Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 377 KB

A slot notifier for vaccine availability on COWIN platform of India. Here, we used the official cowin api to access information about available slots and telegram api to notify us in realtime via our own telegram bot.

Python 100.00%
cowin-vaccine-tracker cowin-notifier cowin-api telegram-bot telegram-api vaccine-availability botfather python-covid19

cowin_telegram_bot's Introduction

cowin_telegram_bot

A simple slot notifier for vaccine availability on COWIN platform of India. Here, we used official cowin api to access information about available slots and telegram api to notify us in realtime via our own telegram bot.

First we need to create our bot from telegram app. We will use BotFather which is an official telegram bot to create and manage bots. Refer this small article for "How to Create a New Bot for Telegram": https://sendpulse.com/knowledge-base/chatbot/create-telegram-chatbot

Once, you get your token for bot, copy that token and you are good to move on. Now search for your bot in the search menu of app with the name given by you for your bot. Then start your bot and enter /my_id

image

Now, visit https://api.telegram.org/bot<bot_token>/getUpdates in your browser where <bot_token> should be token that we copied earlier for our telegram bot. Now, look for 'chat id' and copy that id too. ( refer https://stackoverflow.com/questions/32423837/telegram-bot-how-to-get-a-group-chat-id/38388851#38388851)

Once we get our token and chat id we are good to go. Replace 'telegram_key' and 'telegram_chat_id' variables in bot.py with token and chat id respectively. For the first time, you will need to set location, run set_location.py. Corresponding district id will be stored in location.txt. Now you can let bot.py run in background and whenever conditions are met, you will be notified on telegram app(consider modifying the conditions in if/else statements to customize based on your preference)

2

NOTE: Requests made from countries outside India are forbidden by Cowin api.

cowin_telegram_bot's People

Contributors

adiprogrammer7 avatar

Watchers

 avatar  avatar

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.