Skip to content

Python app to check vaccine availability and publish the result to a Telegram group

Notifications You must be signed in to change notification settings

vpk11/PyVaccineTracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COVID VACCINE TRACKER 🇮🇳

Python app to check vaccine availability and publish the result to a Telegram group


Technologies🚀

Python version

  • 3.8

Installation🚀

Clone

  • Clone this repo to your local machine

Setup

  • Install pip

  • Get into the project root folder

  • Install requirements

pip install -r requirements.txt
  • Create .env file in the project root folder
touch .env
  • Add the following as environtment variables in the .env file just created
TELEGRAM_CHAT_ID=REPLACE-YOUR-TELEGRAM-CHAT-ID-HERE
BOT_URL=REPLACE-YOUR-BOT-URL-HERE
  • Don't know how to create a bot and get chat id? No problem... Click here

  • Finally! Run the script!

python3 main.py
  • You should see messages from your bot in the group on telegram

Telegram Bot🚀

Creating a bot

  • Use telegrams BotFather for creating Telegram Bots. Search @BotFather

  • Start a new chat with BotFather. Send /newbot

  • BotFather will take you further to create a bot.

  • After successfull creation, you will get a token to access HTTP API.

  • Copy that and pase it in your bot_url in constants.py

How to get telegram_chat_id

  • Add the Telegram BOT to the group.

  • Get the list of updates for your BOT:

https://api.telegram.org/bot<YourBOTToken>/getUpdates
  • Note: The api call returns empty if there are no chat history in the group.

  • If updates are present there will be a chat key with id present in its value.

  • This is your telegram_chat_id. - Copy that and pase it in your telegram_chat_id in constants.py


Use Case🚀

  • Do you have an unused Raspberry Pi? Then it is great, go ahead and set-up a cron job of desired interval to get notified.

Team🚀

Our Contributors


👨‍💻vpk11👨‍💻


References🚀

About

Python app to check vaccine availability and publish the result to a Telegram group

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages