Code Monkey home page Code Monkey logo

yashwanthm / cowin-vaccine-booking Goto Github PK

View Code? Open in Web Editor NEW
151.0 13.0 62.0 24.06 MB

The app enables tracking coivid vaccine availability and automatically book a vaccination slot. This is based on Cowin API and supports the recently added Captcha code of Cowin.

Home Page: https://yashwanthm.github.io/cowin-vaccine-booking/

License: BSD 3-Clause "New" or "Revised" License

HTML 10.37% JavaScript 86.75% CSS 2.88%
vaccination cowin booking covid-19 covid19 vaccine-appointments

cowin-vaccine-booking's Introduction

About

This utility can login into Cowin, track vaccine availability and automatically book a a vaccination slot if you are logged in. The app is made possible by https://apisetu.gov.in/public/api/cowin The deployment is available at https://yashwanthm.github.io/cowin-vaccine-booking/

This app also supports

  • Booking for mutliple beneficiaries
  • Dose based availability
  • Captcha code
  • Paid/Free selection
  • Age Group Selection

API for integrating link based booking into your app/Notifications system

This API allows you to open a URL from within your application where a user will be readily available to book. Support for passing user's token coming soon. Please report an issue if you need this expedited.

URL Pattern:

https://yashwanthm.github.io/cowin-vaccine-booking/?dose=${dose}&session_id=${session_id}&slot=${slot} Where

  • dose is a Number indicating dose1 or dose2. Value 1 indicates dose1 and value 2 indicates dose 2
  • session_idis a String and it's the value of the session_id as available from Cowin's availability API
  • slot is a String which is the slot list item on the slots Array available from

Example:

https://yashwanthm.github.io/cowin-vaccine-booking/?dose=1&session_id=13526b72-38f3-46bb-970c-0c4fd893a1e9&slot=09%3A00AM-11%3A00AM

Running locally

yarn install yarn start

Update poll frequency using

localStorage.pollFreq = 1000 This also works on the deployed version.

Backers

cowin-vaccine-booking's People

Contributors

suumiit avatar yashwanthm avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cowin-vaccine-booking's Issues

Issue

Hey Brother , You are working on public api or protected api (test server or production)

Because i am getting unauthorized access error , i am using protected test api , using free api given on cowin site and using updated bearer token

Table not opening within 5 seconds after clicking on availability button.

As per the docs https://github.com/yashwanthm/cowin-vaccine-booking/wiki/Usage-Guide
Point 6
"If you are not able to see the table within 5 seconds, then the tracking is not happening. Please refresh and start over. This can also happen when there are no vaccination centers in your pincode. Chaniging to district based tracking will help"
I do not see a pop-up as mentioned.
Moreover, I was using the bot to look for slots.
The slots opened ( as per notification from some other app : telegram group ) and the bot could not book it.
Please guide for the same.

Enable IFTTT support to auto-read OTPs

Constantly feeding in new OTPs is tiresome, instead a scheduler should be used that automatically generates new OTPs and and IFTTT applet that auto detects this message and extracts OTP out of it

Receiving multiple Opt's

I have been receiving multiple OTP's from Cowin after using this portal. To be precise around 25-30 OTP's in a minute after an interval of every 1-2 hours.

Notify when the OTP expires

Currently this feature is present in track and book i.e, when you click on track and book and if the OTP expires or due to control policy(huge no. of requests from same IP) there is a voice note that says OTP is expired. This would be helpful even during still page also i.e, when you just enter the OTP and don't do anything after that.

This is present in App.js line no. - 535. Following lines can be kept common -

self.speak('Session expired!');
self.sendNotification('Session expired', 'Session expired, please login');

This way user knows that OTP is expired and can keep feeding the OTPs to keep it active.

404 errors

image
Hi i am looking at few 404 errors for the filter i have attached the screenshot for the same

How To Host

hey, it me again, i was trying to host the exact copy of your repository on github pages, but it kept on throwing an error, can i know what configuration did you use? thanks

Default Table in the results section

While searching irrespective of the filter the full list of centre’s and availability/ for other age etc also shows up.. it’s a bit confusing, can we not restrict to show the list/ results only basis the filter given at time of running

Age Group Filter

Age group filter not working. Irrespective of the age group i select it shows slots for all the age group and also if the list could highlight availability first

App not catch open slots

sometimes slot becomes available on Cowin but the app doesn't catch it. While I am able to attempt scheduling an appointment on Cowin site, on this app I do not get any notification that slots are now available. Any reason why this could be happening.

Not picking up slot

Been trying to book a slot since last 3 days. However it’s not able to pick up a slot even when a centre opens up. Eg: i put in the otp for mumbai at 4.55 in pm and the app started tracking. At 5 pm a couple of hospitals opened up ( got notifications on telegram) however the slots are not getting instantly picked up even though app shows tracking. There is a 1 minute delay due to which the slots get fully booked. This has been happening since a few days now.

Something broken

I was trying to book slot today through pin code search for 18+ category. Entered all the details and was waiting for availability prompt. I have also registered for Telegram notification developed by others. I started getting notification in Telegram for the pin code that I am searching in this app. This app was still looking for available slots. I thought it could be polling frequency, waited for few seconds but nothing happened. Stopped the search (track) and again initiated the track. The slots were already booked. Now, for the second pin code, got notification in the Telegram, this app is still tracking, this time stopped and clicked track again, it found few slots, started asking Captcha,did not get confirmation, it started asking again and again with the new captcha. I am sure of giving the correct captcha. Same thing happened for the 3rd pin code as well.

Note: I am using the app hosted by the author.

It is not generating OTP again

Once when we logged in and entered OTP, after that when the session got expired then again it is allowing to generate OTP
-> I tried refreshing the page
-> I tried reopening the tab
-> I tried clearing the data of the site from browser setting
But nothing worked for me

Aarogya setu no captcha

Not much of an issue but can you figure out how Aarogya Setu does not require captcha, then bookings can be made really fast !

Not able to log in

After the session expired, i am not able to log in, i have to click continuously on generate OTP button, this generally happens when a new slot opens up app session expires when trying to re-login nothing happens as soon as the booking closes then we can log in again.

Not refreshing the page for opened centers/slots

hi, this is not automatically refreshing the page or centers. new center added in Cowin but not showing in this application until unless you manually refresh the page. it means no automatic refresh is happening.

Update frequency of API call

Co-Win Public APIs website says: "these APIs are subject to a rate limit of 100 API calls per 5 minutes per IP." APIs are now calling every 560ms. Please make it to once in 3 seconds. Or if not complicated, suggest steps for changing IPs frequently.

Is it possible to put Automatic CAPTCHA

Sir,
I think sometimes when this web app shown for availability it requires captcha. Is it possible to put CAPTCHA before opening up of slot or captcha already display at ur web app during tracking and when the availability come at site and app speak when can just press the button of book. So I can get my slot. Cause what happened there is some delay in availability announcement by ur web app. Telegram notification come before ur app speaks. If captcha will be present and book on one step then good.
2. The umang app and arogya setu app proceed with no captcha. Umag app is fast than arogya setu. Umang is available on web portal also. Can u take or link api of umang with cowin , where without captcha booking can be possible
Pls do any stable solution. I am relying on ur web app from last two days. Availability come through telegram notification but app speak after it . And slot gone
Pls try something

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.