Coder Social home page Coder Social logo

shivakumar-np / cowin-slot-tracker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rohitanil/cowin-slot-tracker

0.0 0.0 0.0 33 KB

Tracker to check the covid shot slot availability in India and send mobile alerts via Twilio Messaging Service.

License: MIT License

Python 96.25% Dockerfile 2.79% Shell 0.97%

cowin-slot-tracker's Introduction

Cowin-Slot-Tracker

Tracker to check the covid vaccine slot availability in India and send mobile notifications through Twilio Messaging Service.

Requirements

Docker must be installed in the local system. Refer docker documentation to set it locally based on your machine specification. If you are a Windows user and wants to setup docker, follow this video

How to use?

There are two parts to this system

  1. Pinging the public COWIN API to get district wise data and checking for availability, every 15 minutes.
  2. Relaying this information to the user's mobile via Twilio Messaging Service. For that, one must configure Twilio
    1. Sign up on Twilio using your email id. After verifying your email log into the Twilio Dashboard. For this purpose, we will remain on free trial.
    2. Once you are in the dashboard, click Get a trial phone number.
    3. Under Project Info, you can find the ACCOUNT SID, AUTH TOKEN and PHONE NUMBER (Twilio Phone Number and not yours). Make a note of these numbers.
  3. After successfully completing above steps, you are good to go.

Once all the above requirements are met, do the following

  1. Git clone this repository(if you are techie enough), otherwise download the repository by clicking on Download ZIP under Code.
  2. Open Terminal and change your directory to the folder you have just cloned/ downloaded. (Remember to extract the .zip file if you have downloaded it)
  3. Make sure Docker Desktop is running.
  4. Modify settings.json with your settings.
  5. Run docker build -t covin --rm .
  6. Run docker run -it --name covin-schedule --rm covin
  7. If there is a slot available in the district code you have provided, you will receive an SMS on your phone.

If you want to change settings, rebuild the image and run(Step 5)

Example Response

You can either use pincode or districtId.

Sample settings.json with districtId

{
  "districtId": "391",
  "authToken": "09cbfca2asdad5ae4fe991ac8858adca1b",
  "accountSID": "AC6b24b0sdasuef906ed07sdfasd4e8d",
  "twilioPhone": "+1xxxxxxxxx",
  "selfPhone": "+919xxxxxxxx",
  "userAge": "45"
}

Sample settings.json with pincode

{
  "pincode": "695013",
  "authToken": "09cbfca2asdad5ae4fe991ac8858adca1b",
  "accountSID": "AC6b24b0sdasuef906ed07sdfasd4e8d",
  "twilioPhone": "+1xxxxxxxxx",
  "selfPhone": "+919xxxxxxxx",
  "userAge": "45"
}

Response

Slots Available at 16 places.
SAKUR RH 2, Samsherpur RH, NIRAMAY HOSPITAL, Rahata RH, Chichondi Patil RH, Sakur RH, WAMBORI RH 2, 
Wambori RH, JAMKHED RH 2, Topkhana HP, Rajur RH, SHRIRAMPUR RH 2, CHICHONDI PATIL RH 2, TAKALI DHOKESHWAR RH 2, 
RAJUR RH 2, SAMSHERPUR RH 2

Here 391 is the district id for Ahmednagar, Maharashtra

Sample District Codes in 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

Other States

To find District ID for other states:

Got to Cowin Portal in the browser

  • Open Network tab in browser
  • Search for vaccine availabilty in portal
  • Check Network tab for requests
  • Find district_id property value from the requests

cowin-slot-tracker's People

Contributors

rohit-anilkumar avatar rohitanil avatar uknowwhoim 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.