A script based on browser automation which continuously scraps COVID-19 vaccine slot data, alerts you and books it for you when it's available using browser automation.
There has been an overwhelming response to the automation of booking. Cowin has provided some APIs that could be used for several tasks, from scraping slot data to OTP verification, downloading certificates, and many more. [ 1 ]
But eventually, there has been an increase in the use of these public APIs, which resulted in server load, the site being slow, and other issues. More details can be found here. [ 2 ]
Hence, there have been many restrictions applied to the public APIs. So using scripts that run on those APIs might get a lot of issues in the future. AUTOVSB, on the other hand, uses browser automation. It functions as if a regular user logs in, checks for slots, if available, books it. Hence, it is also more reliable ;)
- A secure script for automatic vaccine slot booking.
- Browser automation, hence no load of restrictions on Public APIs.
- Vizualisable and easy-to-use.
- Auto alert on slots availability.
- Supports multiple pincodes, Increased chances of booking.
- Automatic appointment slip downloading.
- Puppeteer - used for browser automation.
To get a local copy up and running, follow these simple steps.
These are the prerequisites required to run this application:
- npm
- android app - AUTOVSB (apk present in this repository)
Note - Issues regarding app? Read this out
git clone https://github.com/MiHarsh/AUTOVSB.git
cd AUTOVSB
npm install
{
"mobile_number": 1234567890, # type --> int
"hash_number" : 111111111, # type --> int [provided by the app]
"age":18, # type --> int values = 18, 45
"zipcodes":[ # type --> array of strings
"230001",
"210001",
"221007"
],
"preferred_slot":0, # type --> int values = 0,1,2,3
"functionality_visibility":true # type --> bool
}
npm test
Note : If your network connectivity is good, you can reduce the time(in milliseconds) in the timeouts. The values given now, works fine for an average user. Please feel free to play with it according to your connection speed.
await testingPage.waitForTimeout(<time in miliseconds>);
Note : Since we have not tested on a large scale, there might be a lot of issues encountered. Feel free to raise issues, even send PRs if you can handle them. The main aim is to benefit our whole community, so even a small step could help others.
Also, we might be updating scripts based on the user's experience, and it would be great if you could keep a watch
on this repo. Also, pull the latest commits before running the script. To git pull just write,
git pull
Once you run the script, it will check for slot availability on the user's ZIP code and, if available, return the ZIP code that has the maximum number of slots from the date entered. After that, it will log in with the user's mobile number, auto-detect the OTP from the user's phone, and will schedule the slot for the members looking for the first dose in the user's account, as per the user's preferred time slot, and download the appointment slip.
Note - Users will have to add member manually before running the script.
I am a Bachelor's student, due to having irregular schedules, we often face many troubles. Booking a vaccine slot now stands on the top ;) Many of my friends were facing the same problem, sometimes looking for slots also hindered the efficiency of doing other tasks. Occasionally, we also kept an eye on the telegram groups. Getting fed up with this, we thought of finding a solution.
So, Who are we? We are programmers. What do we do? We write codes ;) Why not have one for this problem too? And here's the solution.
I had recently learned puppeteer, a super cool browser automation library. So this project is mainly based on puppeteer.