SRvSaha / CoWinVaccineSlotFinder

Cross-Platform Software to Fetch the Available Slots & Book the Appointment for COVID-19 Vaccination
https://shawt.io/r/sYv
MIT License
81 stars 32 forks source link

Slots are already full but still getting captcha #27

Closed akshay8043 closed 3 years ago

akshay8043 commented 3 years ago

image

I am trying since 15 minutes and it is still coming up again and again even after slots are full

SRvSaha commented 3 years ago

Hi @akshay8043, this is happening because there is some inconsistency in the the available_capacity field in the CoWIN API as mentioned here: https://github.com/cowinapi/developer.cowin/issues/234, https://github.com/cowinapi/developer.cowin/issues/231, https://github.com/cowinapi/developer.cowin/issues/224, https://github.com/cowinapi/developer.cowin/issues/226 They have made changes in the API, so this is happening.

I have made fix of this in the latest commit, changes will be release as a part of v4.0.0 tonight.

Sorry for the inconvenience caused. Also, Captcha Popup was coming since the Available Capacity was shown as 25 which is greater than the Minimum Available Capacity set in Config File.

akshay8043 commented 3 years ago

@SRvSaha Hi,

I am still getting this message even if you see on website the count is zero.

image

image

SRvSaha commented 3 years ago

Hi @akshay8043, if you just go to F12, Network -> XHR and then refresh the page will will see there is a request to /calenderByDistrict Endpoint.

Just go to the Response of that Request, you'll see that there is 0 available capacity for Dose 1 and available_capacity = 25, that is why you are getting the captcha prompt. Also, in the screenshot, you can see in CoWIN that "Search Results for Dose Type 1", so the Available Capacity of Dose Type 1 available_capacity_dose1 will be 0 in the repsonse JSON.

This is the latest change that have made in the API, so there is this inconsistency. I have made the fix with commit: 44da53000896975b7a59172851f4e6325309defc and the change will be released with v4.0.0 tonight.

Sorry for the inconvenience caused.

akshay8043 commented 3 years ago

Hi @akshay8043, this is happening because there is some inconsistency in the the available_capacity field in the CoWIN API as mentioned here: cowinapi/developer.cowin#234, cowinapi/developer.cowin#231, cowinapi/developer.cowin#224, cowinapi/developer.cowin#226 They have made changes in the API, so this is happening.

I have made fix of this in the latest commit, changes will be release as a part of v4.0.0 tonight.

Sorry for the inconvenience caused. Also, Captcha Popup was coming since the Available Capacity was shown as 25 which is greater than the Minimum Available Capacity set in Config File.

Hey,

Please don't be sorry, I am providing you just a feedback so that more people should not face the issue. Since morning I am trying multiple ways to get these application running.

I have now build new Linux VM for bombardier-gif app.

akshay8043 commented 3 years ago

Hi @akshay8043, if you just go to F12, Network -> XHR and then refresh the page will will see there is a request to /calenderByDistrict Endpoint.

Just go to the Response of that Request, you'll see that there is 0 available capacity for Dose 1 and available_capacity = 25, that is why you are getting the captcha prompt. Also, in the screenshot, you can see in CoWIN that "Search Results for Dose Type 1", so the Available Capacity of Dose Type 1 available_capacity_dose1 will be 0 in the repsonse JSON.

This is the latest change that have made in the API, so there is this inconsistency. I have made the fix with commit: 44da530 and the change will be released with v4.0.0 tonight.

Sorry for the inconvenience caused.

You are absolutely correct but I got the information from another cowin bot.

image

SRvSaha commented 3 years ago

@akshay8043 Thanks for the feedback. Changes will be deployed and you can try booking the slot using the App tomorrow.

JnaneshPrabhu commented 3 years ago

What changes are you doing @SRvSaha ? Will the available_capacity be made equal to available_capacity_dose_1 + dose2?

SRvSaha commented 3 years ago

@JnaneshPrabhu No, basically it will detect based on the Dose Type. If the Dose Type of the User is 1, then it will check the available_capacity_dose1, else available_capacity_dose2

JnaneshPrabhu commented 3 years ago

@SRvSaha But the public api is still showing wrong data if I am not wrong. Like for instance 201301 is showing same available capacity for 18+ from last 6 hrs I have been observing. How are you circumventing that?

SRvSaha commented 3 years ago

@SRvSaha But the public api is still showing wrong data if I am not wrong. Like for instance 201301 is showing same available capacity for 18+ from last 6 hrs I have been observing. How are you circumventing that?

Hi, @JnaneshPrabhu, Public APIs are cached and hence they may not providing Real-Time Information.

Check the first paragraph here: https://apisetu.gov.in/public/marketplace/api/cowin/cowin-public-v2#/

JnaneshPrabhu commented 3 years ago

I am aware about that. But its cached only upto 30 minutes and not hours.. just asking if at all you are aware off it and have a solve for that.

SRvSaha commented 3 years ago

I am aware about that. But its cached only upto 30 minutes and not hours.. just asking if at all you are aware off it and have a solve for that.

Try hitting from multiple machines having Different IP Addresses. In general there a rate limit of 100 requests per 5 minute. So you need to arrange for sufficient machines with different IPs so that you can check for different different PIN/Districts without the throttling.

akshay8043 commented 3 years ago

@SRvSaha if this API shows cached data, then how are we gonna book a slot if the data is old? I saw a WhatsApp msg saying that this it has 30 min delay which I initially didn't believe as it was a WhatsApp msg.

image

But you that @JnaneshPrabhu is saying that it's cached with data up to 30 mins.

How do we assure that we are getting current data?

What can be done to get improve your app?

SRvSaha commented 3 years ago

@akshay8043 We aren't using Public API so we will not face the issue of caching. It's a Real-Time system. Booking will still work, don't worry

SRvSaha commented 3 years ago

@akshay8043 @JnaneshPrabhu Version 4.0.0 is out now. Thanks for your patience. Check it out: https://github.com/SRvSaha/CoWinVaccineSlotFinder/releases/latest

SRvSaha commented 3 years ago

Feature integrated in v4.0.0 https://github.com/SRvSaha/CoWinVaccineSlotFinder/releases/latest it should fix the issue.

@akshay8043 Check and share your feedback.