Giter Site home page Giter Site logo

abhinavdc / cowin-pinger Goto Github PK

View Code? Open in Web Editor NEW
105.0 3.0 45.0 5.1 MB

Get notified on your phone when there is a vaccine slot available at your location, by running a script on your computer. Uses Cowin portal's public API.

JavaScript 100.00%
cowin covid automation vaccine-availability vaccination npm ifttt

cowin-pinger's Introduction

COWIN VACCINE AVAILABILITY NOTIFIER

Get notified on your phone when there is a vaccine slot available at your location, by running a script on your computer. Uses Co-Win public APIs.

Update: Now works without IFTTT by playing a notification sound when a slot is found.

Instructions-GIF

GETTING STARTED

Install node, if not already installed. Then run the following command:

npx cowin-pinger run --age=<YOUR-AGE> --district=<DISTRICT-ID> --dose=<DOSE-NO>

Replace the arguments above with the required values like mentioned below

  • Replace <YOUR-AGE> with your age.

  • Replace <DISTRICT-ID> with your district's id from this list.

  • Replace <DOSE-NO> with either 1 or 2 for first dose and second dose respectively.

Optional arguments accepted:

  • Pass --vaccine=<VACCINE-NAME> to search for specific vaccine. Accepted values are COVISHIELD, COVAXIN and SPUTNIK.
  • Pass --interval=<INTERVAL-IN-MINUTES> to change the frequency of calling Cowin API (default is 10 mins).
  • Pass --date=<DATE> to search for slots after a particular date. Date must be in dd-mm-yyyy format (default is today's date).
  • Pass --appts=<APPOINTMENT-COUNT> to specify the number of session details you want to receive in the notification (default is 2).
  • Pass --pin=<YOUR-AREA-PIN-CODE> to search for available slots based on pin code. (<DISTRICT-ID> is not required and will be ignored if searching by PIN)
  • Pass --type=<VACCINE-TYPE> to search for vaccine centers based on price. Accepted values are free, paid and all. (default is all)
  • Pass --keep-alive=<KEEP-ALIVE-FLAG> to continue search even after slots are found. Accepted values are true and false. (default is false)

(Note: Search by District is recommended as searching by PINCODE will have lower chances of finding a slot)

IFTTT Integration (Optional)

By integrating with IFTTT you can recieve the notification on your phone. Wondering what IFTTT is ? Read here - #21

  • Setting Up IFTTT

    • Follow the steps mentioned in the article to setup IFTTT.

    • Install IFTTT App on phone to recieve notifications

    • Test if you receive notification like mentioned in the article above.

  • Run Cowin-Pinger with IFTTT Configuration

    npx cowin-pinger run --key=<IFTTT-KEY> --hook=<IFTTT-WEBHOOK-NAME> --age=<YOUR-AGE> --district=<DISTRICT-ID>
    
    • Replace <IFTTT-KEY> with your WebHook Key from IFTTT.

    • Replace <IFTTT-WEBHOOK-NAME> with the name you used for the WebHook in IFTTT.

Andaman & Nicobar Islands
  • 3: Nicobar
  • 1: North and Middle Andaman
  • 2: South Andaman
Andhra Pradesh
  • 9: Anantapur
  • 10: Chittoor
  • 11: East Godavari
  • 5: Guntur
  • 4: Krishna
  • 7: Kurnool
  • 12: Prakasam
  • 13: Sri Potti Sriramulu Nellore
  • 14: Srikakulam
  • 8: Visakhapatnam
  • 15: Vizianagaram
  • 16: West Godavari
  • 6: YSR District, Kadapa (Cuddapah)
Arunachal Pradesh
  • 22: Anjaw
  • 20: Changlang
  • 25: Dibang Valley
  • 23: East Kameng
  • 42: East Siang
  • 17: Itanagar Capital Complex
  • 24: Kamle
  • 27: Kra Daadi
  • 21: Kurung Kumey
  • 33: Lepa Rada
  • 29: Lohit
  • 40: Longding
  • 31: Lower Dibang Valley
  • 18: Lower Siang
  • 32: Lower Subansiri
  • 36: Namsai
  • 19: Pakke Kessang
  • 39: Papum Pare
  • 35: Shi Yomi
  • 37: Siang
  • 30: Tawang
  • 26: Tirap
  • 34: Upper Siang
  • 41: Upper Subansiri
  • 28: West Kameng
  • 38: West Siang
Assam
  • 46: Baksa
  • 47: Barpeta
  • 765: Biswanath
  • 57: Bongaigaon
  • 66: Cachar
  • 766: Charaideo
  • 58: Chirang
  • 48: Darrang
  • 62: Dhemaji
  • 59: Dhubri
  • 43: Dibrugarh
  • 67: Dima Hasao
  • 60: Goalpara
  • 53: Golaghat
  • 68: Hailakandi
  • 764: Hojai
  • 54: Jorhat
  • 49: Kamrup Metropolitan
  • 50: Kamrup Rural
  • 51: Karbi-Anglong
  • 69: Karimganj
  • 61: Kokrajhar
  • 63: Lakhimpur
  • 767: Majuli
  • 55: Morigaon
  • 56: Nagaon
  • 52: Nalbari
  • 44: Sivasagar
  • 64: Sonitpur
  • 768: South Salmara Mankachar
  • 45: Tinsukia
  • 65: Udalguri
  • 769: West Karbi Anglong
Bihar
  • 74: Araria
  • 78: Arwal
  • 77: Aurangabad
  • 83: Banka
  • 98: Begusarai
  • 82: Bhagalpur
  • 99: Bhojpur
  • 100: Buxar
  • 94: Darbhanga
  • 105: East Champaran
  • 79: Gaya
  • 104: Gopalganj
  • 107: Jamui
  • 91: Jehanabad
  • 80: Kaimur
  • 75: Katihar
  • 101: Khagaria
  • 76: Kishanganj
  • 84: Lakhisarai
  • 70: Madhepura
  • 95: Madhubani
  • 85: Munger
  • 86: Muzaffarpur
  • 90: Nalanda
  • 92: Nawada
  • 97: Patna
  • 73: Purnia
  • 81: Rohtas
  • 71: Saharsa
  • 96: Samastipur
  • 102: Saran
  • 93: Sheikhpura
  • 87: Sheohar
  • 88: Sitamarhi
  • 103: Siwan
  • 72: Supaul
  • 89: Vaishali
  • 106: West Champaran
Chandigarh

108 Chandigarh

Chhattisgarh
  • 110: Balod
  • 111: Baloda bazar
  • 112: Balrampur
  • 113: Bastar
  • 114: Bemetara
  • 115: Bijapur
  • 116: Bilaspur
  • 117: Dantewada
  • 118: Dhamtari
  • 119: Durg
  • 120: Gariaband
  • 136: Gaurela Pendra Marwahi
  • 121: Janjgir-Champa
  • 122: Jashpur
  • 123: Kanker
  • 135: Kawardha
  • 124: Kondagaon
  • 125: Korba
  • 126: Koriya
  • 127: Mahasamund
  • 128: Mungeli
  • 129: Narayanpur
  • 130: Raigarh
  • 109: Raipur
  • 131: Rajnandgaon
  • 132: Sukma
  • 133: Surajpur
  • 134: Surguja
Dadra And Nagar Haveli

137 Dadra and Nagar Haveli

Delhi
  • 141: Central Delhi
  • 145: East Delhi
  • 140: New Delhi
  • 146: North Delhi
  • 147: North East Delhi
  • 143: North West Delhi
  • 148: Shahdara
  • 149: South Delhi
  • 144: South East Delhi
  • 150: South West Delhi
  • 142: West Delhi
Goa
  • 151: North Goa
  • 152: South Goa
Gujarat
  • 154: Ahmedabad
  • 770: Ahmedabad Corporation
  • 174: Amreli
  • 179: Anand
  • 158: Aravalli
  • 159: Banaskantha
  • 180: Bharuch
  • 175: Bhavnagar
  • 771: Bhavnagar Corporation
  • 176: Botad
  • 181: Chhotaudepur
  • 182: Dahod
  • 163: Dang
  • 168: Devbhumi Dwaraka
  • 153: Gandhinagar
  • 772: Gandhinagar Corporation
  • 177: Gir Somnath
  • 169: Jamnagar
  • 773: Jamnagar Corporation
  • 178: Junagadh
  • 774: Junagadh Corporation
  • 156: Kheda
  • 170: Kutch
  • 183: Mahisagar
  • 160: Mehsana
  • 171: Morbi
  • 184: Narmada
  • 164: Navsari
  • 185: Panchmahal
  • 161: Patan
  • 172: Porbandar
  • 173: Rajkot
  • 775: Rajkot Corporation
  • 162: Sabarkantha
  • 165: Surat
  • 776: Surat Corporation
  • 157: Surendranagar
  • 166: Tapi
  • 155: Vadodara
  • 777: Vadodara Corporation
  • 167: Valsad
Haryana
  • 193: Ambala
  • 200: Bhiwani
  • 201: Charkhi Dadri
  • 199: Faridabad
  • 196: Fatehabad
  • 188: Gurgaon
  • 191: Hisar
  • 189: Jhajjar
  • 204: Jind
  • 190: Kaithal
  • 203: Karnal
  • 186: Kurukshetra
  • 206: Mahendragarh
  • 205: Nuh
  • 207: Palwal
  • 187: Panchkula
  • 195: Panipat
  • 202: Rewari
  • 192: Rohtak
  • 194: Sirsa
  • 198: Sonipat
  • 197: Yamunanagar
Himachal Pradesh
  • 219: Bilaspur
  • 214: Chamba
  • 217: Hamirpur
  • 213: Kangra
  • 216: Kinnaur
  • 211: Kullu
  • 210: Lahaul Spiti
  • 215: Mandi
  • 208: Shimla
  • 212: Sirmaur
  • 209: Solan
  • 218: Una
Jammu & Kashmir
  • 224: Anantnag
  • 223: Bandipore
  • 225: Baramulla
  • 229: Budgam
  • 232: Doda
  • 228: Ganderbal
  • 230: Jammu
  • 234: Kathua
  • 231: Kishtwar
  • 221: Kulgam
  • 226: Kupwara
  • 238: Poonch
  • 227: Pulwama
  • 237: Rajouri
  • 235: Ramban
  • 239: Reasi
  • 236: Samba
  • 222: Shopian
  • 220: Srinagar
  • 233: Udhampur
Jharkhand
  • 242: Bokaro
  • 245: Chatra
  • 253: Deoghar
  • 257: Dhanbad
  • 258: Dumka
  • 247: East Singhbhum
  • 243: Garhwa
  • 256: Giridih
  • 262: Godda
  • 251: Gumla
  • 255: Hazaribagh
  • 259: Jamtara
  • 252: Khunti
  • 241: Koderma
  • 244: Latehar
  • 250: Lohardaga
  • 261: Pakur
  • 246: Palamu
  • 254: Ramgarh
  • 240: Ranchi
  • 260: Sahebganj
  • 248: Seraikela Kharsawan
  • 249: Simdega
  • 263: West Singhbhum
Karnataka
  • 270: Bagalkot
  • 276: Bangalore Rural
  • 265: Bangalore Urban
  • 294: BBMP
  • 264: Belgaum
  • 274: Bellary
  • 272: Bidar
  • 271: Chamarajanagar
  • 273: Chikamagalur
  • 291: Chikkaballapur
  • 268: Chitradurga
  • 269: Dakshina Kannada
  • 275: Davanagere
  • 278: Dharwad
  • 280: Gadag
  • 267: Gulbarga
  • 289: Hassan
  • 279: Haveri
  • 283: Kodagu
  • 277: Kolar
  • 282: Koppal
  • 290: Mandya
  • 266: Mysore
  • 284: Raichur
  • 292: Ramanagara
  • 287: Shimoga
  • 288: Tumkur
  • 286: Udupi
  • 281: Uttar Kannada
  • 293: Vijayapura
  • 285: Yadgir
Kerala
  • 301: Alappuzha
  • 307: Ernakulam
  • 306: Idukki
  • 297: Kannur
  • 295: Kasaragod
  • 298: Kollam
  • 304: Kottayam
  • 305: Kozhikode
  • 302: Malappuram
  • 308: Palakkad
  • 300: Pathanamthitta
  • 296: Thiruvananthapuram
  • 303: Thrissur
  • 299: Wayanad
Ladakh
  • 309: Kargil
  • 310: Leh
Lakshwadweep islands
  • 796: Agatti Island
  • 311: Lakshadweep
Madhya Pradesh
  • 320: Agar
  • 357: Alirajpur
  • 334: Anuppur
  • 354: Ashoknagar
  • 338: Balaghat
  • 343: Barwani
  • 362: Betul
  • 351: Bhind
  • 312: Bhopal
  • 342: Burhanpur
  • 328: Chhatarpur
  • 337: Chhindwara
  • 327: Damoh
  • 350: Datia
  • 324: Dewas
  • 341: Dhar
  • 336: Dindori
  • 348: Guna
  • 313: Gwalior
  • 361: Harda
  • 360: Hoshangabad
  • 314: Indore
  • 315: Jabalpur
  • 340: Jhabua
  • 353: Katni
  • 339: Khandwa
  • 344: Khargone
  • 335: Mandla
  • 319: Mandsaur
  • 347: Morena
  • 352: Narsinghpur
  • 323: Neemuch
  • 326: Panna
  • 359: Raisen
  • 358: Rajgarh
  • 322: Ratlam
  • 316: Rewa
  • 317: Sagar
  • 333: Satna
  • 356: Sehore
  • 349: Seoni
  • 332: Shahdol
  • 321: Shajapur
  • 346: Sheopur
  • 345: Shivpuri
  • 331: Sidhi
  • 330: Singrauli
  • 325: Tikamgarh
  • 318: Ujjain
  • 329: Umaria
  • 355: Vidisha
Maharashtra
  • 391: Ahmednagar
  • 364: Akola
  • 366: Amravati
  • 397: Aurangabad
  • 384: Beed
  • 370: Bhandara
  • 367: Buldhana
  • 380: Chandrapur
  • 388: Dhule
  • 379: Gadchiroli
  • 378: Gondia
  • 386: Hingoli
  • 390: Jalgaon
  • 396: Jalna
  • 371: Kolhapur
  • 383: Latur
  • 395: Mumbai
  • 365: Nagpur
  • 382: Nanded
  • 387: Nandurbar
  • 389: Nashik
  • 381: Osmanabad
  • 394: Palghar
  • 385: Parbhani
  • 363: Pune
  • 393: Raigad
  • 372: Ratnagiri
  • 373: Sangli
  • 376: Satara
  • 374: Sindhudurg
  • 375: Solapur
  • 392: Thane
  • 377: Wardha
  • 369: Washim
  • 368: Yavatmal
Manipur
  • 398: Bishnupur
  • 399: Chandel
  • 400: Churachandpur
  • 401: Imphal East
  • 402: Imphal West
  • 410: Jiribam
  • 413: Kakching
  • 409: Kamjong
  • 408: Kangpokpi
  • 412: Noney
  • 411: Pherzawl
  • 403: Senapati
  • 404: Tamenglong
  • 407: Tengnoupal
  • 405: Thoubal
  • 406: Ukhrul
Meghalaya
  • 424: East Garo Hills
  • 418: East Jaintia Hills
  • 414: East Khasi Hills
  • 423: North Garo Hills
  • 417: Ri-Bhoi
  • 421: South Garo Hills
  • 422: South West Garo Hills
  • 415: South West Khasi Hills
  • 420: West Garo Hills
  • 416: West Jaintia Hills
  • 419: West Khasi Hills
Mizoram
  • 425: Aizawl East
  • 426: Aizawl West
  • 429: Champhai
  • 428: Kolasib
  • 432: Lawngtlai
  • 431: Lunglei
  • 427: Mamit
  • 430: Serchhip
  • 433: Siaha
Nagaland
  • 434: Dimapur
  • 444: Kiphire
  • 441: Kohima
  • 438: Longleng
  • 437: Mokokchung
  • 439: Mon
  • 435: Peren
  • 443: Phek
  • 440: Tuensang
  • 436: Wokha
  • 442: Zunheboto
Odisha
  • 445: Angul
  • 448: Balangir
  • 447: Balasore
  • 472: Bargarh
  • 454: Bhadrak
  • 468: Boudh
  • 457: Cuttack
  • 473: Deogarh
  • 458: Dhenkanal
  • 467: Gajapati
  • 449: Ganjam
  • 459: Jagatsinghpur
  • 460: Jajpur
  • 474: Jharsuguda
  • 464: Kalahandi
  • 450: Kandhamal
  • 461: Kendrapara
  • 455: Kendujhar
  • 446: Khurda
  • 451: Koraput
  • 469: Malkangiri
  • 456: Mayurbhanj
  • 470: Nabarangpur
  • 462: Nayagarh
  • 465: Nuapada
  • 463: Puri
  • 471: Rayagada
  • 452: Sambalpur
  • 466: Subarnapur
  • 453: Sundargarh
Puducherry
  • 476: Karaikal
  • 477: Mahe
  • 475: Puducherry
  • 478: Yanam
Punjab
  • 485: Amritsar
  • 483: Barnala
  • 493: Bathinda
  • 499: Faridkot
  • 484: Fatehgarh Sahib
  • 487: Fazilka
  • 480: Ferozpur
  • 489: Gurdaspur
  • 481: Hoshiarpur
  • 492: Jalandhar
  • 479: Kapurthala
  • 488: Ludhiana
  • 482: Mansa
  • 491: Moga
  • 486: Pathankot
  • 494: Patiala
  • 497: Rup Nagar
  • 498: Sangrur
  • 496: SAS Nagar
  • 500: SBS Nagar
  • 490: Sri Muktsar Sahib
  • 495: Tarn Taran
Rajasthan
  • 507: Ajmer
  • 512: Alwar
  • 519: Banswara
  • 516: Baran
  • 528: Barmer
  • 508: Bharatpur
  • 523: Bhilwara
  • 501: Bikaner
  • 514: Bundi
  • 521: Chittorgarh
  • 530: Churu
  • 511: Dausa
  • 524: Dholpur
  • 520: Dungarpur
  • 517: Hanumangarh
  • 505: Jaipur I
  • 506: Jaipur II
  • 527: Jaisalmer
  • 533: Jalore
  • 515: Jhalawar
  • 510: Jhunjhunu
  • 502: Jodhpur
  • 525: Karauli
  • 503: Kota
  • 532: Nagaur
  • 529: Pali
  • 522: Pratapgarh
  • 518: Rajsamand
  • 534: Sawai Madhopur
  • 513: Sikar
  • 531: Sirohi
  • 509: Sri Ganganagar
  • 526: Tonk
  • 504: Udaipur
Sikkim
  • 535: East Sikkim
  • 537: North Sikkim
  • 538: South Sikkim
  • 536: West Sikkim
Tamil Nadu
  • 779: Aranthangi
  • 555: Ariyalur
  • 578: Attur
  • 565: Chengalpet
  • 571: Chennai
  • 778: Cheyyar
  • 539: Coimbatore
  • 547: Cuddalore
  • 566: Dharmapuri
  • 556: Dindigul
  • 563: Erode
  • 552: Kallakurichi
  • 557: Kanchipuram
  • 544: Kanyakumari
  • 559: Karur
  • 780: Kovilpatti
  • 562: Krishnagiri
  • 540: Madurai
  • 576: Nagapattinam
  • 558: Namakkal
  • 577: Nilgiris
  • 564: Palani
  • 573: Paramakudi
  • 570: Perambalur
  • 575: Poonamallee
  • 546: Pudukkottai
  • 567: Ramanathapuram
  • 781: Ranipet
  • 545: Salem
  • 561: Sivaganga
  • 580: Sivakasi
  • 551: Tenkasi
  • 541: Thanjavur
  • 569: Theni
  • 554: Thoothukudi (Tuticorin)
  • 560: Tiruchirappalli
  • 548: Tirunelveli
  • 550: Tirupattur
  • 568: Tiruppur
  • 572: Tiruvallur
  • 553: Tiruvannamalai
  • 574: Tiruvarur
  • 543: Vellore
  • 542: Viluppuram
  • 549: Virudhunagar
Telangana
  • 582: Adilabad
  • 583: Bhadradri Kothagudem
  • 581: Hyderabad
  • 584: Jagtial
  • 585: Jangaon
  • 586: Jayashankar Bhupalpally
  • 587: Jogulamba Gadwal
  • 588: Kamareddy
  • 589: Karimnagar
  • 590: Khammam
  • 591: Kumuram Bheem
  • 592: Mahabubabad
  • 593: Mahabubnagar
  • 594: Mancherial
  • 595: Medak
  • 596: Medchal
  • 612: Mulugu
  • 597: Nagarkurnool
  • 598: Nalgonda
  • 613: Narayanpet
  • 599: Nirmal
  • 600: Nizamabad
  • 601: Peddapalli
  • 602: Rajanna Sircilla
  • 603: Rangareddy
  • 604: Sangareddy
  • 605: Siddipet
  • 606: Suryapet
  • 607: Vikarabad
  • 608: Wanaparthy
  • 609: Warangal(Rural)
  • 610: Warangal(Urban)
  • 611: Yadadri Bhuvanagiri
Tripura
  • 614: Dhalai
  • 615: Gomati
  • 616: Khowai
  • 617: North Tripura
  • 618: Sepahijala
  • 619: South Tripura
  • 620: Unakoti
  • 621: West Tripura
Uttar Pradesh
  • 622: Agra
  • 623: Aligarh
  • 625: Ambedkar Nagar
  • 626: Amethi
  • 627: Amroha
  • 628: Auraiya
  • 646: Ayodhya
  • 629: Azamgarh
  • 630: Badaun
  • 631: Baghpat
  • 632: Bahraich
  • 633: Balarampur
  • 634: Ballia
  • 635: Banda
  • 636: Barabanki
  • 637: Bareilly
  • 638: Basti
  • 687: Bhadohi
  • 639: Bijnour
  • 640: Bulandshahr
  • 641: Chandauli
  • 642: Chitrakoot
  • 643: Deoria
  • 644: Etah
  • 645: Etawah
  • 647: Farrukhabad
  • 648: Fatehpur
  • 649: Firozabad
  • 650: Gautam Buddha Nagar
  • 651: Ghaziabad
  • 652: Ghazipur
  • 653: Gonda
  • 654: Gorakhpur
  • 655: Hamirpur
  • 656: Hapur
  • 657: Hardoi
  • 658: Hathras
  • 659: Jalaun
  • 660: Jaunpur
  • 661: Jhansi
  • 662: Kannauj
  • 663: Kanpur Dehat
  • 664: Kanpur Nagar
  • 665: Kasganj
  • 666: Kaushambi
  • 667: Kushinagar
  • 668: Lakhimpur Kheri
  • 669: Lalitpur
  • 670: Lucknow
  • 671: Maharajganj
  • 672: Mahoba
  • 673: Mainpuri
  • 674: Mathura
  • 675: Mau
  • 676: Meerut
  • 677: Mirzapur
  • 678: Moradabad
  • 679: Muzaffarnagar
  • 680: Pilibhit
  • 682: Pratapgarh
  • 624: Prayagraj
  • 681: Raebareli
  • 683: Rampur
  • 684: Saharanpur
  • 685: Sambhal
  • 686: Sant Kabir Nagar
  • 688: Shahjahanpur
  • 689: Shamli
  • 690: Shravasti
  • 691: Siddharthnagar
  • 692: Sitapur
  • 693: Sonbhadra
  • 694: Sultanpur
  • 695: Unnao
  • 696: Varanasi
Uttarakhand
  • 704: Almora
  • 707: Bageshwar
  • 699: Chamoli
  • 708: Champawat
  • 697: Dehradun
  • 702: Haridwar
  • 709: Nainital
  • 698: Pauri Garhwal
  • 706: Pithoragarh
  • 700: Rudraprayag
  • 701: Tehri Garhwal
  • 705: Udham Singh Nagar
  • 703: Uttarkashi
West Bengal
  • 710: Alipurduar District
  • 711: Bankura
  • 712: Basirhat HD (North 24 Parganas)
  • 713: Birbhum
  • 714: Bishnupur HD (Bankura)
  • 715: Cooch Behar
  • 783: COOCHBEHAR
  • 716: Dakshin Dinajpur
  • 717: Darjeeling
  • 718: Diamond Harbor HD (S 24 Parganas)
  • 719: East Bardhaman
  • 720: Hoogly
  • 721: Howrah
  • 722: Jalpaiguri
  • 723: Jhargram
  • 724: Kalimpong
  • 725: Kolkata
  • 726: Malda
  • 727: Murshidabad
  • 728: Nadia
  • 729: Nandigram HD (East Medinipore)
  • 730: North 24 Parganas
  • 731: Paschim Medinipore
  • 732: Purba Medinipore
  • 733: Purulia
  • 734: Rampurhat HD (Birbhum)
  • 735: South 24 Parganas
  • 736: Uttar Dinajpur
  • 737: West Bardhaman
Daman&Diu
  • 138: Daman
  • 139: Diu
Himachal Pradesh
  • 791: Chamba
  • 795: Kangra
  • 792: Kinnaur
  • 793: Mandi
  • 794: Shimla

Developer Todo

  • Option to read config from a local file instead of cli args

Sample Notification on Phone

cowin-pinger's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cowin-pinger's Issues

District IDs not working

What is the source of district ID? 725,730,735 from West bengal duid not gove me anything. However the pin codes from these distircts gacve me correct output.

POLL - Should we make the smallest time interval less than the current 1 minute limit ?

The current script will not allow you to provide a time interval less than 1 minute (was 5 before). Should this be further reduced to something like 10-20 seconds ?

I don't want the cowin-pinger tool to be a cowin API abusing tool as there are a high number of people using this script. If everyone starts to make calls every few seconds it could badly effect the Cowin Portal. I feel 1 minute interval is more than enough but I still wanted your opinion. Comment down your thoughts under this if you happen to see this issue.

UnhandledPromiseRejection

UnhandledPromiseRejectionWarning: Error: Command failed: powershell -c Add-Type -AssemblyName presentationCore; $player = New-Object system.windows.media.mediaplayer; $player.open('/home/sampath/.npm/_npx/1034/lib/node_modules/cowin-pinger/sounds/beep.mp3'); $player.Volume = 0.5; $player.Play(); Start-Sleep 1; Start-Sleep -s $player.NaturalDuration.TimeSpan.TotalSeconds;Exit;
/bin/sh: 1: Syntax error: word unexpected (expecting ")")

at ChildProcess.exithandler (child_process.js:308:12)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1048:16)
at Socket.<anonymous> (internal/child_process.js:439:11)
at Socket.emit (events.js:315:20)
at Pipe.<anonymous> (net.js:673:12)

Continue pinging even if slots are available

Currently the script shuts down after a slot is found/notification is sent.
There's been multiple occasions where the notification was received but by the time we book on the portal, it's too late. I think we should continue running the script even when notification is sent.

We can keep this option OFF by default and enable it through a --keep-alive flag.

Suggestions

  • 15 mins interval won't in most scenario where the slots are filled within minutes.
  • Also, the public APIs have a caching of 10 mins.

Suggestion:

  • Instead of public APIs, internal API should be used for slot availability.
  • Decrease the interval to some 10 to 15 seconds.

Bug: 18+ slots are notified for age 45+

The tool was run with the following configuration

Date= 24-05-2021
Age= 54
Dose= First Dose
Pincode= pin
Time interval= 1 minutes (default is 10)
Appointment Count= 2 (default is 2)
IFTTT API Key= key
IFTTT Hook Name= slot

The CoWIN portal does not allow the age of 45+ to get appointment for 18+ slots
Here's a screenshot of the error thrown from the CoWin portal.
44

Even though the age is configured as 54 when running the tool, it is notifying slots that are marked for 18-44 age group, which it should not.

suggestion- add vaccine name as param

please refer schema of official cowin api and lets parse out on "vaccine" object in response from cowin API and match it to user provided argument. that way user can give --vaccinename=covaxin (as an example.)

getting an error

(node:14564) UnhandledPromiseRejectionWarning: Error: Request failed with status code 401
at createError (C:\Users\crmas\AppData\Roaming\npm-cache_npx\14564\node_modules\cowin-pinger\node_modules\axios\lib\core\createError.js:16:15)
at settle (C:\Users\crmas\AppData\Roaming\npm-cache_npx\14564\node_modules\cowin-pinger\node_modules\axios\lib\core\settle.js:17:12)
at IncomingMessage.handleStreamEnd (C:\Users\crmas\AppData\Roaming\npm-cache_npx\14564\node_modules\cowin-pinger\node_modules\axios\lib\adapters\http.js:260:11)
at IncomingMessage.emit (events.js:388:22)
at endReadableNT (internal/streams/readable.js:1336:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
(node:14564) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)

on both powershell and prompt

not getting notifications

says sent notification to phone but I didn't receive it. I did receive the test notification in IFTT documentation

isSlotAvailable variable somewhere becomes true even when the cowin site has no free slot

I have replaced the "notification in IFTTT" through this script with "VoIP call in IFTTT". So, I can see the text when the webhook fires the event, but at 0:00am I am getting the VoIP call which is the "then this" part of IFTTT in my case.

So, I am thinking the isSlotAvailable variable somehow becomes true, due to either no response from api server or the date variable change, or don't know maybe something

getting an error

npx cowin-pinger run --age=<18> --district=<247>
npx cowin-pinger run --age=<18> --district=<247>
^^^^^

Uncaught SyntaxError: Unexpected identifier

IFTTT doubts

Could add few more points about what this IFTTT is all about and how it works ? [ just 2 lines will suffice for beginners ]

I went through their website but could not understand anything. They are providing all kinds of services.

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.