Skip to content

Latest commit

 

History

History
65 lines (53 loc) · 2.06 KB

Readme.md

File metadata and controls

65 lines (53 loc) · 2.06 KB

Vaccine-Availabilty

Python script to let you know the available vaccine slots on Cowin platform. There are 3 scripts VaccineCountToTG.py, VaccineCommandLinePincode.py and VaccineCountNormal.py. If you want updates on a bot in Telegram use VaccineCountToTG.py otherwise use VaccineCountNormal.py or VaccineCommandLinePincode.py

Installation(For VaccineCountNormal.py)

pip install requests

Installation(For VaccineCountToTG.py and VaccineCommandLinePincodepy.py )

Requires Python. Packages required could be found in requirement.txt You only need python-dotenv if you are going to use VaccineCountToTG.py.

pip install python-dotenv
pip install requests

To send messages to the Telegram Bot, set the environment variable in the example.env. Put the bot token in it and rename example.env to just ".env". Bot token is generated when you create your bot.

Telegram Bot Creation

On Telegram, search @ BotFather, send him a “/start” message
Then send “/newbot” message, then follow the instructions to setup a name and a username
Your bot is now ready, be sure to save a backup of your API token, this API token is your bot_token

Usage(For VaccineCountToTG.py and VaccineCountNormal.py)

Change value of "pincode" variable to your desired pincode or you could uncomment #pincode = getPincode() line so as to ask for pincode on runtime.

Execution

Run it like you would normally run a python script. For VaccineCountToTG.py and VaccineCountNormal.py

python VaccineCountNormal.py

Or

python VaccineCountToTG.py

For VaccineCommandLinePincode.py

python VaccineCommandLinePincodepy.py (your pincode here)

Automation(For VaccineCountToTG.py)

For Windows

Run the windowsAutomation.bat, default time is 120 seconds.
To change it edit the file and change the 120 into the number of seconds required.

For Linux

chmod +x linuxAutomation.sh
./linuxAutomation.sh

Default timeout is 120 seconds.
To change it edit the file and change the 120 into the number of seconds required.