Code Monkey home page Code Monkey logo

covwin_vaccineslotnotifier's Introduction

COVwin Vaccine Slot Notifier

Description

  • This python program displays the available vaccination slots in all centers of a preferred district for the next 7 days.
  • It sends the output to the telegram channel created.

Requirements

  • A text editor
  • A Telegram bot
  • A Telegram channel

Creation of Telegram bot

  • Open your telegram app and search for BotFather Screenshot1
  • Enter into the BotFather by selecting start and you will be provided with the list of services provided by it Screenshot2
  • Enter the command /newbot and you will be prompted for the name and the id for the bot. Once provided with the information you will be receiving the acknowledgement for the creation of the bot along with the bot token. Save your bot token as it will be used inside the notifier.py file Screenshot3

Obtaining Telegram's channel id

  • Create a telegram channel and add your bot which you created into the channel
  • Open your browser and enter the following link https://api.telegram.org/bot<BOT_TOKEN>/getUpdates
  • Extract your channel's id and save it for using it in notifier.py file Screenshot4

API info

  • I have used it from API setu
  • In order to determine your state's ID and district's ID refer it from https://apisetu.gov.in/public/api/cowin
  • Note your state ID and district ID. We will be using it in notifier.py

Execution

  • In the 9th line you need to replace the <DISTRICT_ID with your district's ID which you refered from the API setu website
  • In the 36th and 40th lines you need to replace <BOT_TOKEN> and <CHAT_ID> with your corresponding bot's ID and the channel's ID which you have created.
  • Save the changes and execute it in your command prompt by using the following command python notifier.py

Sample output

Screenshot5

covwin_vaccineslotnotifier's People

Contributors

keeeeta avatar

Watchers

 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.