Coder Social home page Coder Social logo

cowin-vaccine-bot's Introduction

cowin-vaccine-bot

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.


๐“—๐“ธ๐”€ ๐“ฝ๐“ธ ๐“พ๐“ผ๐“ฎ ?

๐”ธโ„™โ„™๐•Š

  1. install termux app from playstore

  2. 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

cowin-vaccine-bot's People

Contributors

ash-ketchem avatar

Watchers

Pankaj Singh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.