Python app to check vaccine availability and publish the result to a Telegram group
- 3.8
- Clone this repo to your local machine
-
Install
pip -
Get into the project root folder
-
Install requirements
pip install -r requirements.txt- Create
.envfile in the project root folder
touch .env- Add the following as environtment variables in the
.envfile 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
-
Use telegrams
BotFatherfor 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
tokento access HTTP API. -
Copy that and pase it in your
bot_urlin constants.py
-
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
chatkey withidpresent in its value. -
This is your telegram_chat_id. - Copy that and pase it in your
telegram_chat_idin constants.py
- 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.
Our Contributors
👨💻vpk11👨💻 |
|---|
- Cowin Public API: https://apisetu.gov.in/public/api/cowin