The python script is executed periodically as per set frequency in the python scheduler and once the slot is available for mentioned age group in mentioned district/PIN code area, you will be notified through desktop notification message.
Python3.x should be installed on your machine. If it is not already installed then download it from here
- Clone the repo
git clone https://github.com/gayu19/cowin-slot-notifier.git
- Create a virtual environment with command
python -m venv env
- Mac users can activate the virtual environmnet with command
source env/bin/activate
, windows users can activate it withsource env/Scripts/activate
- Create
.env
file in same directory and add below environment variables. - Add your browser User-Agent in environment variables.
USERAGENT=<Your browser's User-Agent>
. You can get the value for browser's User-Agent from here - Add the frequency of the script to be run in environment variables.
FREQUENCY=<frequency to run the script in seconds>
. For example, if you set that toFREQUENCY=30
then the script will check the slot availability every thirty seconds. - Install Python dependencies
python -m pip install -r requirements.txt
.
- If you want to findout the slots available for particular PIN code for minimum age limit 18 then you have to use the command
python excuter.py pin <your PIN code> 18
, for minimum age limit 45 the command will bepython excuter.py pin <your PIN code> 45
- If you want to findout the slots available in complete district then the command will be
python executer.py district <your state name> <your district name> 18
for minimum age limit 18 , and for minimum age limit 45 the command will bepython executer.py district <your state name> <your district name> 45
. - So while running the application you have to replace the PIN or state and district name as per your requirement in the command.
If you face any issue while running the script or you want to see the details of the available center that you can check in exec.log file.
Once the slot is available in your intended area then you will get the notification as shown in below image.