bombardier-gif / covid-vaccine-booking

This very basic script can be used to automate COVID-19 vaccination slot booking on India's Co-WIN Platform.
375 stars 216 forks source link

Enhancement/rate limit api switcher #476

Open mrms123 opened 3 years ago

mrms123 commented 3 years ago

This PR implements an alternate query mechanism as discussed in https://github.com/bombardier-gif/covid-vaccine-booking/pull/449

When rate limits per session kicks in - then the code is essentially given an upper bound on number of refreshes by CoWIN. To improve the odds, we implement checks in between / more frequent than what the ratelimit allows us, using the Public API.

This way - the performance is no worse off than the max capability in the usual protected API method. But just in case the public API lists that slot - we're going to lap it up.

I tested a couple of cases, esp when slots were being released. When slots are being released - this is a hit or miss - it may show availability immediately on the public API, or it may not show up at all (directly being listed as fully booked).

@Nakul93 @6mxo89sqh

6mxo89sqh commented 3 years ago

i m yet to test but i see one thing missing. in public apis, vaccine filter is not working, we will need to filter by code.

bombardier-gif commented 3 years ago

@shailesh @BumpyKnuckls @Nakul93 FYI