a simple bot that polls for available vaccine slots and books them automatically on India's Co-WIN Platform
This python script will poll for available vaccine slots in your given district/pincode and will automatically shedules vaccine appointment
๐๐ฎ๐ช๐ฝ๐พ๐ป๐ฎ๐ผ
$ ๐ข๐ถ๐ต๐ฐ๐ฎ๐ข๐ต๐ช๐ค๐ข๐ญ๐ญ๐บ ๐ด๐ฉ๐ฆ๐ฅ๐ถ๐ญ๐ฆ๐ด ๐ข๐ฑ๐ฑ๐ฐ๐ฏ๐ช๐ต๐ฎ๐ฆ๐ฏ๐ต
$ ๐ค๐ข๐ฏ ๐ฃ๐ฐ๐ฐ๐ฌ ๐ท๐ข๐ค๐ค๐ช๐ฏ๐ฆ๐ด ๐ง๐ฐ๐ณ ๐ฎ๐ถ๐ญ๐ต๐ช๐ฑ๐ญ๐ฆ ๐ฑ๐ฆ๐ณ๐ด๐ฐ๐ฏ๐ด
$ ๐ท๐ข๐ค๐ค๐ช๐ฏ๐ฆ ๐ด๐ญ๐ฐ๐ต๐ด ๐ค๐ข๐ฏ ๐ฃ๐ฆ ๐ง๐ช๐ญ๐ต๐ฆ๐ณ๐ฆ๐ฅ ๐ฃ๐บ ๐ฎ๐ถ๐ญ๐ต๐ช๐ฑ๐ญ๐ฆ ๐ฅ๐ข๐ต๐ฆ๐ด, ๐ท๐ข๐ค๐ค๐ช๐ฏ๐ฆ ๐ต๐บ๐ฑ๐ฆ๐ด, ๐ค๐ฆ๐ฏ๐ต๐ฆ๐ณ๐ด, ๐ฃ๐ฆ๐ฏ๐ฆ๐ง๐ช๐ค๐ช๐ข๐ณ๐ช๐ฆ๐ด, booking time
$ ๐ด๐ถ๐ฑ๐ฑ๐ฐ๐ณ๐ต๐ด ๐ฃ๐ฐ๐ต๐ฉ ๐ฅ๐ฐ๐ด๐ฆ1 ๐ข๐ฏ๐ฅ ๐ฅ๐ฐ๐ด๐ฆ2 ๐ท๐ข๐ค๐ค๐ช๐ฏ๐ฆ ๐ฃ๐ฐ๐ฐ๐ฌ๐ช๐ฏ๐จ
$ ๐ด๐ถ๐ฑ๐ฑ๐ฐ๐ณ๐ต๐ด ๐ท๐ข๐ค๐ค๐ช๐ฏ๐ฆ ๐ด๐ฆ๐ข๐ณ๐ค๐ฉ ๐ฃ๐บ ๐ฅ๐ช๐ด๐ต๐ณ๐ช๐ค๐ต ๐ฐ๐ณ ๐ฑ๐ช๐ฏ๐ค๐ฐ๐ฅ๐ฆ
$ ๐๐ฐ๐ธ๐ฏ๐ญ๐ฐ๐ข๐ฅ๐ด ๐ข๐ฑ๐ฑ๐ฐ๐ช๐ฏ๐ต๐ฎ๐ฆ๐ฏ๐ต ๐ค๐ฐ๐ฏ๐ง๐ช๐ณ๐ฎ๐ข๐ต๐ช๐ฐ๐ฏ ๐ฑ๐ฅ๐ง
$ ๐๐ข๐น๐ช๐ฎ๐ถ๐ฎ ๐ณ๐ฆ๐ถ๐ด๐ฆ ๐ฐ๐ง ๐ข๐ถ๐ต๐ฉ ๐ต๐ฐ๐ฌ๐ฆ๐ฏ
๐๐ธ๐ ๐ฝ๐ฑ๐ฒ๐ผ ๐๐ธ๐ป๐ด๐ผ ?
1 . Polls cowin site for available vaccine slots according to your district or pincode.
2 . Shedules vaccine apponitment for all beneficiaries linked to the given mobile number at random centers with slot availabilty.
=> Tฬณhฬณaฬณtฬณ'ฬณsฬณ ฬณnฬณoฬณtฬณ ฬณmฬณuฬณcฬณhฬณ ฬณuฬณsฬณeฬณfฬณuฬณlฬณ ๐ ๐คฆโโ๏ธ
To solve this issue a lot of filtering options are given to customize the search ::
๐ you can filter the slots by date ,vaccine type, booking time, beneficiaries and centers ๐
๐ you just have to google your area's latitude and longitude and feed it into the program,
then you can select preferred centers within 10 Km radius of your point of interest!!
3 . If no vaccine slots are available ,the script will poll for vaccine availabilty till everyone linked to the mobile number gets an appointment .
4 . Your last filters will be stored in a file and can be fed to the script, so that you don't have to type everything again..
5 . This script will try to shedule appointment for people linked to a mobile number at the same
vaccine center if possible else it will balance out the sheduling process.
๐๐ธ๐ ๐ฝ๐ธ ๐พ๐ผ๐ฎ ?
๐ธโโ๐
-
install termux app from playstore
-
download and install termux api version 0.31 (older version) https://apkpure.com/termux-api/com.termux.api/download/31-APK?from=versions%2Fversion
๐๐ผ๐๐โ
3 . clone this repo :
pkg install git && git clone https://github.com/Ash-ketchem/cowin-vaccine-bot.git
4 . install requirements : cd to the path where you have cloned this repo
bash install.sh
5 . Run the script :
python cowinbot.py -m mobile_num
๐๐ฟ๐ช๐ฒ๐ต๐ช๐ซ๐ต๐ฎ ๐ช๐ป๐ฐ๐พ๐ถ๐ฎ๐ท๐ฝ๐ผ
$ -๐ฎ <๐ฎ๐ฐ๐ฃ๐ช๐ญ๐ฆ ๐ฏ๐ถ๐ฎ๐ฃ๐ฆ๐ณ> required field โ
$ -๐ฅ <๐ฅ๐ฐ๐ด๐ฆ> ๐ฅ๐ฆ๐ง๐ข๐ถ๐ญ๐ต ๐ช๐ด 1 (๐ฅ๐ฐ๐ด๐ฆ 1)
$ -๐ค <๐ฅ๐ช๐ด๐ต๐ณ๐ช๐ค๐ต ๐ช๐ฅ> ๐ฅ๐ฆ๐ข๐ง๐ถ๐ญ๐ต ๐ช๐ด ๐ฌ๐ฐ๐ต๐ต๐ข๐บ๐ข๐ฎ(301)
$ -๐ฐ <๐ฐ๐ต๐ฑ ๐ฎ๐ฐ๐ฅ๐ฆ> ๐ฅ๐ฆ๐ข๐ง๐ถ๐ญ๐ต ๐ช๐ด ๐ข๐ถ๐ต๐ฐ๐ฎ๐ข๐ต๐ช๐ค [use '-o m' to manually provide otp ]
$ --๐ฑ <๐ฑ๐ช๐ฏ๐ค๐ฐ๐ฅ๐ฆ>
$ -๐ <๐๐๐๐๐๐๐ ๐๐๐๐> ๐๐๐๐๐๐๐ ๐๐ ๐ถ
๐ถ: "๐ถ๐ฟ:๐ถ๐ถ๐ฐ๐ผ-๐ท๐ท:๐ถ๐ถ๐ฐ๐ผ"
๐ท: "๐ท๐ท:๐ถ๐ถ๐ฐ๐ผ-๐ถ๐ท:๐ถ๐ถ๐ฟ๐ผ"
๐ธ: "๐ถ๐ท:๐ถ๐ถ๐ฟ๐ผ-๐ถ๐น:๐ถ๐ถ๐ฟ๐ผ"
๐น: "๐ถ๐น:๐ถ๐ถ๐ฟ๐ผ-๐ถ๐ผ:๐ถ๐ถ๐ฟ๐ผ"
$ -๐ฃ <๐ง๐ช๐ณ๐ด๐ต ๐ฏ๐ข๐ฎ๐ฆ> ๐ค๐ข๐ฏ ๐ต๐ข๐ฌ๐ฆ ๐ข ๐ญ๐ช๐ด๐ต ๐ฐ๐ง ๐ฃ๐ฆ๐ฏ๐ฆ๐ง๐ช๐ค๐ช๐ข๐ณ๐บ ๐ฏ๐ข๐ฎ๐ฆ๐ด ๐ด๐ฆ๐ฑ๐ฆ๐ณ๐ข๐ต๐ฆ๐ฅ ๐ฃ๐บ ๐ด๐ฑ๐ข๐ค๐ฆ
$ --v <vacccine type> can take a list of vaccines seperated by space
$ -๐ฑ <๐ค๐ฆ๐ฏ๐ต๐ฆ๐ณ ๐ช๐ฅ> ๐ค๐ข๐ฏ ๐ต๐ข๐ฌ๐ฆ ๐ข ๐ญ๐ช๐ด๐ต ๐ฐ๐ง ๐ค๐ฆ๐ฏ๐ต๐ฆ๐ณ ๐ช๐ฅ๐ด ๐ด๐ฆ๐ฑ๐ฆ๐ณ๐ข๐ต๐ฆ๐ฅ ๐ฃ๐บ ๐ด๐ฑ๐ข๐ค๐ฆ
$ --๐ฅ <๐ฅ๐ข๐ต๐ฆ> ๐ค๐ข๐ฏ ๐ต๐ข๐ฌ๐ฆ ๐ข ๐ญ๐ช๐ด๐ต ๐ฐ๐ง ๐ฅ๐ข๐ต๐ฆ๐ด ๐ด๐ฆ๐ฑ๐ฆ๐ณ๐ข๐ต๐ฆ๐ฅ ๐ฃ๐บ ๐ด๐ฑ๐ข๐ค๐ฆ (provide only day)
$ -๐ท ๐ท๐ฆ๐ณ๐ฃ๐ฐ๐ด๐ฆ ๐ฐ๐ถ๐ต๐ฑ๐ถ๐ต
$ --๐ <๐๐๐๐๐๐๐๐> ๐๐๐๐๐ ๐บ ๐๐๐๐๐๐๐๐๐ ๐๐๐๐๐_๐๐๐๐ ๐๐๐๐๐๐๐๐_๐๐๐๐ ๐๐๐๐๐๐๐๐ ๐๐๐ ๐๐๐๐๐๐๐๐๐
$ -๐ต ๐ต๐ฆ๐ด๐ต ๐ณ๐ถ๐ฏ ๐ง๐ฐ๐ณ ๐ง๐ถ๐ฏ!!
$ -๐ง ๐ญ๐ฐ๐ข๐ฅ๐ด ๐ฑ๐ณ๐ฆ๐ท๐ช๐ฐ๐ถ๐ด ๐ช๐ฏ๐ฑ๐ถ๐ต ๐ฅ๐ข๐ต๐ข ๐ง๐ณ๐ฐ๐ฎ ๐ข ๐ง๐ช๐ญ๐ฆ
๐๐๐ช๐ถ๐น๐ต๐ฎ ๐พ๐ผ๐ช๐ฐ๐ฎ
$ ๐ฅ๐ฎ๐ฉ๐๐ค๐ฃ ๐๐ค๐ฌ๐๐ฃ๐๐ค๐ฉ.๐ฅ๐ฎ -๐ข 123456789 [๐๐๐จ๐๐ ๐ช๐จ๐๐๐]
$ ๐ฅ๐ฎ๐ฉ๐๐ค๐ฃ ๐๐ค๐ฌ๐๐ฃ๐๐ค๐ฉ.๐ฅ๐ฎ -๐ข 123456789 -๐ 2 -๐ 151 -o m --p 686001
$ ๐ฅ๐ฎ๐ฉ๐๐ค๐ฃ ๐๐ค๐ฌ๐๐ฃ๐๐ค๐ฉ.๐ฅ๐ฎ -๐ข ๐ญ๐ฎ๐ฏ๐ฐ๐ฑ๐ฒ๐ณ๐ด๐ต -๐ ๐ฎ -๐ ๐ญ๐ฑ๐ญ -๐ฏ ๐๐ฎ๐บ ๐ฎ๐ท๐ฎ๐ --๐ ๐ฐ๐ผ๐๐ฎ๐
๐ถ๐ป ๐ฐ๐ผ๐๐ถ๐๐ต๐ถ๐ฒ๐น๐ฑ -๐ ๐ญ --๐ฑ ๐ด ๐ญ๐ฌ ๐ญ๐ฎ
$ ๐ฅ๐ฎ๐ฉ๐๐ค๐ฃ ๐๐ค๐ฌ๐๐ฃ๐๐ค๐ฉ.๐ฅ๐ฎ -๐ข ๐ญ๐ฎ๐ฏ๐ฐ๐ฑ๐ฒ๐ณ๐ด๐ต --๐ฑ ๐ด -๐ฏ ๐๐ฎ๐บ --๐น ๐ธ๐ฒ๐ฟ๐ฎ๐น๐ฎ ๐ธ๐ผ๐๐๐ฎ๐๐ฎ๐บ ๐ต๐ญ.๐ฑ๐ณ ๐ญ๐ณ๐ฑ.๐ฒ๐ฏ
--๐ ๐จ๐๐๐ ๐ก๐ฃ๐ ๐ง๐๐๐ ๐ช๐ ๐ฆ ๐จ๐๐ฅ๐ ๐ ๐๐๐ค๐ฅ ๐ ๐ ๐๐๐๐ฅ๐๐ฃ๐ค ๐๐๐๐ฃ ๐ช๐ ๐ฆ ๐๐ฃ๐ ๐ ๐จ๐๐๐๐ ๐ช๐ ๐ฆ ๐๐๐ ๐๐๐ ๐ ๐ค๐ ๐ก๐ฃ๐๐๐๐ฃ๐๐ ๐๐๐ ๐๐๐ค๐ ๐๐๐๐ก๐ค ๐ฅ๐ ๐๐๐๐ ๐๐๐ค๐ฅ๐ฃ๐๐๐ฅ ๐๐ ๐ ๐ ๐ ๐๐๐ค๐ฃ๐ฅ๐๐๐ฅ [recommended option โโ ]
$ ๐ฅ๐ฎ๐ฉ๐๐ค๐ฃ ๐๐ค๐ฌ๐๐ฃ๐๐ค๐ฉ.๐ฅ๐ฎ -๐
๐ฆ๐ค๐ -๐ ๐ ๐ ๐ค๐๐๐ ๐๐ ๐ฅ๐๐๐ ๐ฅ๐ ๐๐ ๐๐ ๐ก๐ฃ๐๐ง๐๐ ๐ฆ๐ค ๐๐๐๐ฅ๐๐ฃ๐ค
Additional tricks
$ If you only want to edit some inputs when using the -f option ( By default -f flag will override arguments given along with it from command line ),
! Open the file "inputData.txt" and edit the necessary fields without breaking the json structure
๐๐ธ๐ป๐ฎ ๐๐ท๐ฏ๐ธ..
! Termux api_v0.31 is used to automatically read otp message from the phone. The newer api dosen't allow message acesss
! The minimum polling interval is set for 30 seconds
! A log file is written at log.txt with the date and time of script activity
IMPORTANT
__________
$ This is a proof of concept project,so use at your own risk