Giter VIP home page Giter VIP logo

covid-vaccine-booking's People

Contributors

amal1205 avatar aneeska avatar daggy1234 avatar github-actions[bot] avatar mrehanms avatar namanphy avatar pallupz avatar rohanbeast avatar sparshsinghal avatar sparshsinghaltw avatar superfrag avatar vasugamdha avatar vishalv26 avatar vsachinv 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

covid-vaccine-booking's Issues

look for slots from today

Few of the hospitals offer their slots early in the morning for the same day. The current script starts looking for slots from tomorrow, so we will need to change "check_calendar_by_district" and "check_calendar_by_pincode" to "today" instead of "tomorrow".

Suggestion: Better make this a website than a Python script

Nice work on automating the booking process. But I think this is unfair. This puts programmers and people with technical expertise at an advantage over everyone else. Currently the cowin platform appointment is based on luck for everyone. With a script, programmers have edge over everyone else.

But at some point, someone would have made this anyway and kept it private. At least you made it open source. Thanks for that!

It would be more equitable if this is a website for python-terminal-illiterate people. An alternative frontend for Cowin with these features you added.

certificate verify failed: unable to get local issuer certificate

I am getting this below error after enterring the registered phone number.

Enter the registered mobile number: ******
Requesting OTP with mobile number ******..
HTTPSConnectionPool(host='cdn-api.co-vin.in', port=443): Max retries exceeded with url: /api/v2/auth/generateMobileOTP (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)')))
Exiting Script
Press any key to continue . . .

Latest checkout is breaking

Tried running the script, but it broke with:

  File "src/covid-vaccine-slot-booking.py", line 20
    request_header = {"Authorization": f"Bearer {token}"}
                                                       ^
SyntaxError: invalid syntax

Don't know enough python to fix this :|

Error while running code

I'm facing an error while running your code :

Here is a snippet of it: (Occurs right after I enter mobile number and it requests for otp)
HTTPSConnectionPool(host='cdn-api.co-vin.in', port=443): Max retries exceeded with url: /api/v2/auth/generateMobileOTP (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')))
Exiting Script'

Please help!! :(

Unable to Create OTP

`Enter the registered mobile number: 75075XXXXX
Requesting OTP with mobile number 75075XXXXX..
Unable to Create OTP

<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: yc_80Zck48I4dhhO9yh05XeWccrv-5NCqTfq760qr_BCu7I0WGx5yw==
`

Notification issue

Script was not able to show the available slots which were visible on the cowin website

unable to fetch beneficiaries

Im getting this error after entering OTP:

Fetching registered beneficiaries..
Unable to fetch beneficiaries
401
Unauthenticated access!
sh: pause: command not found
object of type 'NoneType' has no len()
Exiting Script
sh: pause: command not found

where am I going wrong?

Getting error on line 52

Hi,

Thanks for creating this script. I have very limited working knowledge of Python and hence pasting the error I am getting on line 52.

python ./covid-vaccine-slot-booking.py

File "./covid-vaccine-slot-booking.py", line 52
CALENDAR_URL += f"&vaccine={vaccine_type}"
SyntaxError: invalid syntax

It is showing a error on " after } . Could you let me know how to resolve this?

Showing a non-zero number of centers available with no viable options. Should show 0 mostly?

image

This is what I see when I run the code as is. But when I change 'tomorrow' in this line (in check_calendar() in utils.py) ->
resp = requests.get(base_url.format(district['district_id'], tomorrow), headers=request_header)

to 'today' then that 105 number becomes 0. Not sure why this is happening. I was running this modified version and the slots that opened up did not show up while this was running.

Thank You

Just want to thank you for the script and the only way I know is to open an issue ๐Ÿ™‚. The script worked great for us. Really simple to setup and use. Please close the issue once you see it.

OTP Issue

Getting the following error :
sh: 1: pause: not found
Unable to Create OTP

Get OTP Call failing with 403

Getting below error when trying to get OTP since yesterday evening.

Unable to Create OTP
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>403 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
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.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
Press any key to continue . . .|

Is this legal ???

Production apis is not open for public uses. So just wanted to check if that is legal?

seeing sytax error while running the python script

I see the following error-

python src/covid-vaccine-slot-booking.py
File "src/covid-vaccine-slot-booking.py", line 20
request_header = {"Authorization": f"Bearer {token}"}
^
SyntaxError: invalid syntax

Anyone know why this problem is?

403 ERROR

Got 403 ERROR. Does it seem that this has been blocked forever?

P.S. It was working fine and I was able to book an appointment 1 hour ago.

Host a UI on the web for automated booking

First of all, great job @pallupz! This worked for me after a an hour of tinkering. beep wasn't beeping so I replaced it with a dog barking sound whenever slots opened. :P

This got me thinking about how its possible to setup a front end and host this so that even laymen can use this service quite easily. Libraries like streamlit allow to easily repurpose python scripts into GUI web apps. Your thoughts?

Error on both Mac & Linux

Following your instruction to run the scripts, I am on Linux.

Getting error when I ran python src/covid-vaccine-slot-booking.py

File "src/covid-vaccine-slot-booking.py", line 20
request_header = {"Authorization": f"Bearer {token}"}

Kerala specific!

Great job - however, the slot booking mechanism looking at just next 7 days, is quite Kerala specific. In other states, they are opening up slots for 10 days or more at once. We need to give users an option on how many days they want to look for

Edit: I see the 7 days is coming from the API limitations - perhaps a begin date argument?

Logic behind calculation of "District alert frequency"

On this line, you are calculating the district alert frequency. Could you explain how this is calculated?

'district_alert_freq': 440 + ((2 * idx) * 110)

Thanks!

P.S. Great utility btw, really appreciate your time and effort in creating this! It's the most convenient one I've found out there. I just wish even the (re)authorization could have been automated. But this is the next best thing, so again, kudos!

Update frequency

Hi Pallupz, really appreciate your efforts. Is there any way to reduce the frequency of updates? For some locations the slots get filled up in just a second or so, so it would be great if the slot availability could be checked every second.

Status code 403 receiving

After entering mobile no for OTP received following error.

It seems bearer token needs to be used with every request to bypass cloudfront.

======================================================
Unable to Create OTP

<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: TVGQE9XeOlpUHYWQ9dnxHxD9M5x9N_8yS-dRHnFmAnhFLrtakc3raw==

===========================================

On Windows client getting the following error...Support will be really appreciated

C:\Users\chamehta\Downloads\Pyscripts>python covid-vaccine-slot-booking.py
Enter the registered mobile number: XXXXXXXXXX
Requesting OTP with mobile number XXXXXXXXXX..
HTTPSConnectionPool(host='cdn-api.co-vin.in', port=443): Max retries exceeded with url: /api/v2/auth/generateMobileOTP (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1076)')))
Exiting Script
Press any key to continue . . .

API key for Prod

It's not an issue, re-writing this in GO, with new features.
What is the API key for production access.

Object of type Response is not JSON serializable

As I was unable to create an OTP through the program, I manually generated the OTP and entered it. This is what I got -

Enter OTP: 903571
Validating OTP..
Object of type Response is not JSON serializable
Exiting Script

State/District. option doesnt work

Hi , This is a probably new feature that got added in.
After seleting the people who want to get vaccination, this option comes and the app taps out.

OTP problem

I Get this error -
HTTPSConnectionPool(host='cdn-api.co-vin.in', port=443): Max retries exceeded with url: /api/v2/auth/generateMobileOTP (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)')))

how to fix it.

after selecting auto booking still asking for inputs like indexofcentre.indexofslot

bro i was searching for slots in Bangalore and an alert came on one of the telegram bots for 100 slots. But the script didn't show any. Is there something wrong with what i am doing here?
also i tried using it for my family in rajasthan i got a hit yet it didn't auto book it and asked for indexofcentre.indexofslot the availability was just 1(i set minimum number of vaccines required to 1 too). kindly help bro.

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.