Skip to content

A python script to notify vaccine slots availability in Telegram

Notifications You must be signed in to change notification settings

keeeeta/COVwin_VaccineSlotNotifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

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