Giter Site home page Giter Site logo

divagicha / cowin-vaccine-appointment-booking Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 4.0 86.65 MB

Script to automate COVID-19 vaccination slot booking on India's Co-WIN Platform

Python 100.00%
appointment-scheduler cowin-api covid-19 vaccination covid-vaccine covishield covaxin sputnik book-appointment python

cowin-vaccine-appointment-booking's Introduction

Contributors Forks Stargazers Issues


Logo

CoWIN Vaccine Appointment Booking

Script to automate COVID-19 vaccination slot booking on India's Co-WIN Platform
Explore the docs »

Report Bug · Request Feature


Table of Contents

About The Project

As it's a difficult task to schedule an appointment for CoVid-Vaccine with only limited slots available for each day, this script automates the whole process of checking availability of slots every 3 seconds and also books it as soon as it becomes available. Just do a one-time configuration by entering your preferences initially (pincode, district, centre preference, slot timing, etc.) and let this script do the rest.

Customizable Options in the Program

  1. State ID / Name
  2. District ID / Name
  3. Pincode(s) in the district
  4. Search Criteria (whether to search centres by Pincode or District)
  5. Centre Preferences (which centre to book among all the available centres)
  6. Slot Preference (whether to select a random slot from among the available slots for a particular centre or ask the user to manually select the slot once a valid centre is found)
  7. Appointment Date (date for which the centres have to be checked for availability and scheduling thereafter)
  8. Beneficiaries (which beneficiaries to schedule appointment for, among all the registered benficiaries(max. 4) in the account)
  9. Dose Number (which dose number (1 or 2) appointment to schedule. Must be same for all the selected beneficiaries)
  10. Min Age Limit (minimum age limit of the selected beneficiaries. All selected beneficiaries must belong to the same minimum age group, either 18+ or 45+)
  11. Vaccine Preference (vaccine preference for the selected beneficiaries. Once appointment gets scheduled, all selected beneficiaries will receive the selected vaccine. Available options: 'Any', 'Covaxin', 'Covishield')

Screenshots of GUI App

Screenshots of Console App

Prerequisites

  • When Installing via ZIP File: This project requires Python (3.6 or higher) to be installed on the user system if instaling via ZIP file

  • When Installing via EXE File: No initial setup is needed for installing and running this project via the EXE file

  • For Debian/Ubuntu/Mint Based Systems: You would need python3-tk package installed. To install this package, run the following:

     sudo apt install python3-tk -y

Installation

Instructions for running the CLI/Console application (Ubuntu/Debian/Mint):

  • Run the below to setup your Linux Machine. Below are specific to Ubuntu/Debian/Mint systems:

     sudo apt install git python3 python3-pip python3-venv -y
     sudo apt install python3-tk -y
     cd ~/
     git clone https://github.com/DivAgicha/CoWIN-Vaccine-Appointment-Booking.git
     cd ~/CoWIN-Vaccine-Appointment-Booking/
  • To avoid disturbing your host's python packages, create a virtual env and install the prerequisites:

     cd ~/CoWIN-Vaccine-Appointment-Booking/
     python3 -m venv ~/CoWIN-Vaccine-Appointment-Booking/
     source ~/CoWIN-Vaccine-Appointment-Booking/bin/activate
     pip install -r requirements.txt
  • To run the CLI/Console application, run the below command:

     python3 schedule_vaccination_appointment.py

Installation (via ZIP file)

  1. Install Python (3.6 or higher) and Git CLI (OPTIONAL) on the system by searching for respective setups for your operaing system on Google

  2. Clone the repo

    git clone https://github.com/DivAgicha/CoWIN-Vaccine-Appointment-Booking.git
  3. Alternatively, if you don't have Git CLI you can directly download the project's zip file by clicking here. Once downloaded, extract the contents of the zip file to desired location

  4. Open shell / command-prompt and change the working directory to "CoWIN-Vaccine-Appointment-Booking"

    cd "path_to_CoWIN-Vaccine-Appointment-Booking_directory"
  5. Install all the required python dependencies

    pip install -r requirements.txt

    Note: For Debian/Ubuntu/Mint Based systems, you may need to install python3-tk

    sudo apt install python3-tk -y
  6. Run the script (Console App) to enter your details and book a vaccination slot

    python3 schedule_vaccination_appointment.py

Installation (via EXE file)

This method is specific for users running Windows Based Systems.

  1. Navigate to the 'dist' directory for the setup file or click here to download the same for Windows.
  2. Double-click the installer file and follow the instructions to install the program.
  3. Upon successful installation you will find Covid Vaccination Appointment Scheduler folder in your C:\Program Files (x86)\ directory.
  4. Open the folder and run schedule_vaccination_appointment.exe (Console App) or scheduler_form.exe (GUI App) file.

Important Points to Keep In Mind

  • This is a proof of concept project. I do NOT endorse or condone, in any shape or form, automating any monitoring/booking tasks. Developed for Educational Purpose; USE IT AT YOUR OWN RISK. I SHOULD NOT BE DEEMED RESPONSIBLE FOR ANY LEGAL CONCERNS.
  • This goes without saying but, once you get your shot, please do help out any underprivileged people around you who may not have a laptop or the know-how. For instance any sort of domestic help, or the staff in your local grocery store, or literally the thousands of people who don't have the knowledge or luxury we do.
  • If you accidentally book a slot, don't worry. You can always login to the Official portal and cancel or re-schedule the booking. There is no option available for rescheduling or cancellation of Booking Slot in the Application. There will be an X symbol on the top-right corner for each beneficiary to cancel from CoWIN Portal.
  • There is no option to register new mobile or add beneficiaries. This application can be used only after beneficiary has been added through the Official WebApp of CoWIN.
  • Please refrain from abusing this tool by any means. Stay Safe.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

cowin-vaccine-appointment-booking's People

Contributors

divagicha avatar techantidote avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cowin-vaccine-appointment-booking's Issues

Can we have vaccine type selection function in the tool?

Hi @divagicha
It's not an issue to be raised but to enhance the usability of this tool, I am raising this point. Can you also put an additional option of vaccine-type selection? I presume after 21st June, there will be centers injecting all vaccine types. So, I think putting an additional option for vaccine-type selection would be beneficial to the user!
What's your thought on this?

Windows exec takes a huge chunk of data which make cloning the project longer

Description:
In the current project, the Windows executable in ~11MB in size. In this case, a regular git clone could take time.
An use case would be:

  • Linux user clones the project would also get the Windows executable and the git clone would take a long time. (Unless you skip that directory alone.)

Proposal 1:

  • Have separate branch named "linux" for Linux users with does not have the "dist" directory. In this case a linux user could do something like:

git clone https://github.com/divagicha/CoWIN-Vaccine-Appointment-Booking/issues/new -b linux

  • In this case, a Windows user either git clone the stock project which includes the dist or have a separate branch itself.

git clone https://github.com/divagicha/CoWIN-Vaccine-Appointment-Booking/issues/new -b windows

Proposal 2:
• For Windows users, Include the Windows binary to the releases only if possible.
• For example: Use the releases links for download and check if the exec under "dist" can be deleted.
https://github.com/divagicha/CoWIN-Vaccine-Appointment-Booking/releases/download/v2.3/CovidVaccinationAppointmentScheduler-Setup-v2.3.exe

Change Date to Onwards Date & Vaccine Type

A big thank you for the script and your time invested. This is very helpful.

Can we add a feature to filter by Vaccine Type. But most importantly change from a specific date search to search from date range n + 1 for 7 days

Thank you once again

Not running on my pc

@divagicha when i try to tun on my pc this error shows : the program cant start because api-ms-win-core-path-1-1.0.dll is missing from your computer. Try reinstalling the program to fix this problem.

I have reinstalled it many times and still not working

cairo library erro

PS D:\laragon\www\nvs\divagicha> python schedule_vaccination_appointment.py Traceback (most recent call last): File "schedule_vaccination_appointment.py", line 7, in <module> from CovidVaccineChecker import TextColors, CoWINAPI File "D:\laragon\www\nvs\divagicha\CovidVaccineChecker\__init__.py", line 13, in <module> from CovidVaccineChecker.captcha import captcha_builder File "D:\laragon\www\nvs\divagicha\CovidVaccineChecker\captcha.py", line 7, in <module> from cairosvg import svg2png File "C:\Users\PC11\AppData\Local\Programs\Python\Python37\lib\site-packages\cairosvg\__init__.py", line 26, in <module> from . import surface # noqa isort:skip File "C:\Users\PC11\AppData\Local\Programs\Python\Python37\lib\site-packages\cairosvg\surface.py", line 9, in <module> import cairocffi as cairo File "C:\Users\PC11\AppData\Local\Programs\Python\Python37\lib\site-packages\cairocffi\__init__.py", line 50, in <module> ('libcairo.so.2', 'libcairo.2.dylib', 'libcairo-2.dll')) File "C:\Users\PC11\AppData\Local\Programs\Python\Python37\lib\site-packages\cairocffi\__init__.py", line 45, in dlopen raise OSError(error_message) # pragma: no cover OSError: no library called "cairo" was found no library called "libcairo-2" was found cannot load library 'libcairo.so.2': error 0x7e cannot load library 'libcairo.2.dylib': error 0x7e cannot load library 'libcairo-2.dll': error 0x7e

Make centres choice optional

In ur repo v have to choose a centre from the available center list which is shown only after slots are released by cowin, otherwise no center are shown for selection. Plz make changes in repo so that it automatically pick up any centre which fulfils our other conditions instead of selecting centers which have already gone

Windows 7 compatibility

Can v install exe file i.e GUI VERSION IN WINDOWS 7. Any additional requirements to b fulfilled??

Validating the OTP to get token not working

--> Enter OTP received on your mobile phone (Press 'Enter' to resend OTP): 507362

--> Validating 'OTP' to get token

FAILED ATTEMPT (message: Expecting value: line 1 column 1 (char 0)) (response:

<TITLE>ERROR: The request could not be satisfied</TITLE>

403 ERROR

The request could not be satisfied.


Request blocked. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

Generated by cloudfront (CloudFront)
Request ID: h-PlLM5mCb89M7dFmkVuId-dWD3imszMzOoiohEvP74QSU8ztGaXQQ==
)

--> Generating OTP (There might be some delay in receiving the OTP, please wait atleast 2 minutes)

txnId: bf79352f-e7c5-46a7-a933-083da829976a (SUCCESS)

--> Enter OTP received on your mobile phone (Press 'Enter' to resend OTP): 507362

--> Validating 'OTP' to get token

FAILED ATTEMPT (message: 'token') (response: {"message": "Endpoint request timed out"})

--> Generating OTP (There might be some delay in receiving the OTP, please wait atleast 2 minutes)

FAILED ATTEMPT (message: Expecting value: line 1 column 1 (char 0)) (response:

<TITLE>ERROR: The request could not be satisfied</TITLE>

403 ERROR

The request could not be satisfied.


Request blocked. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

Generated by cloudfront (CloudFront)
Request ID: kZT9AVTq6DNU-7EbwQSE5PqvfVV9kAor57v1kAm7p_T3SDIRgc4ESw==
)... trying again in 3 seconds

Captcha

Hi, i want to ask... the capatcha is auto submitted or we have to enter manually.

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.