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

What happens when you try to book a first dose slot for a 45+ individual and an 18+ individual? #392

Open great1113 opened 3 years ago

great1113 commented 3 years ago

(Assume same vaccine selection)

I am thinking

I would love to go through the code and understand what is going on, but I need to run it right now. And I don't want to be running it if there is no chance for success. (rather split them into two accounts)

Nakul93 commented 3 years ago

For this scenario the script won’t proceed if selected beneficiaries are of different age grps. Even the CoWIN portal doesn’t allow this, even if there is a centre with both age group slots open, you need to book them separately. This can’t be done in one go.

great1113 commented 3 years ago

Oh, In that case, shouldn't we warn the user of the same by asking them to select beneficiaries of the same age group?

We already have their ages anyway.


Another question, since all the 45+ people are still technically 18+, does that mean they are allowed to book those slots? Then shouldn't this be allowed?

We filter by 18+, and then book the slots for all the beneficiaries. And the 45+ slots won't be considered since we can't book them for the 18+ folks.

(This assumes 45+ folks can book 18+ slots)

Nakul93 commented 3 years ago

Yeah so I noticed that in our script, it only takes the min of the age, but doesn't really warn the user during input if they provide beneficiaries of different age group.(A potential bug) https://github.com/bombardier-gif/covid-vaccine-booking/blob/21d5e2abffc74520ae033a33df2bfbb1e1489380/src/utils.py#L1000-L1008

Nakul93 commented 3 years ago

For your 2nd question, the CoWIN portal has 2 different slot options for booking, 1 for 18-44 age group and 1 for 45+ age group. So no technically we can't book a 45+ beneficiary on a 18-44 slot.

mrms123 commented 3 years ago

This is a bug. When the 18+ vaccinations started, anyone could book that slot - and hence the code was written such. However, now every center returns a max_age_limit field as well - this needs to be updated.

Nakul93 commented 3 years ago

@mrms123 couldn’t find the max_age_limit field. Could you please point out to which API resp shows this field

mrms123 commented 3 years ago

My bad - I was referring to code from another script (non-pallupz forks), and it turns out that they are manually adding that field.

This issue has been referenced here as well https://github.com/pallupz/covid-vaccine-booking/issues/218

The error obtained is also mentioned.

Nakul93 commented 3 years ago

I'll label this as a bug, if you have a fix you can raise a PR. Although before selecting the beneficiaries it warns the user to select beneficiaries of same age grp.

mjishnu commented 3 years ago

i was able to book slot for 45+ and 18+ in same center after using the new version v2.0.14, since now slot are available in 18+ format in my region and the program only looks for 18+ for both parties i am able to book slots for both together now

sid8840 commented 3 years ago

i was able to book slot for 45+ and 18+ in same center after using the new version v2.0.14, since now slot are available in 18+ format in my region and the program only looks for 18+ for both parties i am able to book slots for both together now

it says rate limited by cowin how did you do this?

sid8840 commented 3 years ago

Rate-limited by CoWIN. Waiting for 5 seconds. (You can reduce your refresh frequency. Please note that other devices/browsers using CoWIN/Umang/Arogya Setu also contribute to same limit.)

this happens

Nakul93 commented 3 years ago

I think the rate limiting issue was resolved…anyhow it’s strange that ppl are still using this script to book slots. There are apps now which makes the process bit easier

Nakul93 commented 3 years ago

You can checkout this repo: https://github.com/Nakul93/BooKie. It uses public APIs and doesn’t rate limit

mjishnu commented 3 years ago

Rate-limited by CoWIN. Waiting for 5 seconds. (You can reduce your refresh frequency. Please note that other devices/browsers using CoWIN/Umang/Arogya Setu also contribute to same limit.)

this happens

just book 2 or 3 numbers at a time dont book for too many numbers at same time and keep the refresh frequency at 15.in case u get rate limited just use a vpn connect to india.

mjishnu commented 3 years ago

You can checkout this repo: https://github.com/Nakul93/BooKie. It uses public APIs and doesn’t rate limit

isnt these both same script ? is there any new feature in it ?

mjishnu commented 3 years ago

I think the rate limiting issue was resolved…anyhow it’s strange that ppl are still using this script to book slots. There are apps now which makes the process bit easier

its still hard to book slots in my region.